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

📄 test_frequency.mdl

📁 模拟TMS320LF2000系列芯片cap的电力系统频率检测功能
💻 MDL
📖 第 1 页 / 共 3 页
字号:
    }
    Block {
      BlockType		      Constant
      Value		      "1"
      VectorParams1D	      on
      SamplingMode	      "Sample based"
      OutDataTypeMode	      "Inherit from 'Constant value'"
      OutDataType	      "sfix(16)"
      ConRadixGroup	      "Use specified scaling"
      OutScaling	      "2^0"
      SampleTime	      "inf"
      FramePeriod	      "inf"
    }
    Block {
      BlockType		      DataStoreMemory
      ReadBeforeWriteMsg      "none"
      WriteAfterWriteMsg      "none"
      WriteAfterReadMsg	      "none"
      StateMustResolveToSignalObject off
      ShowAdditionalParam     off
      DataType		      "auto"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      SignalType	      "auto"
    }
    Block {
      BlockType		      DataStoreRead
    }
    Block {
      BlockType		      DataStoreWrite
    }
    Block {
      BlockType		      From
      IconDisplay	      "Tag"
    }
    Block {
      BlockType		      Fcn
      Expr		      "sin(u[1])"
      SampleTime	      "-1"
    }
    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		      Goto
      IconDisplay	      "Tag"
    }
    Block {
      BlockType		      Ground
    }
    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		      Logic
      Operator		      "AND"
      Inputs		      "2"
      IconShape		      "rectangular"
      AllPortsSameDT	      on
      OutDataTypeMode	      "Logical (see Configuration Parameters: Optimiza"
"tion)"
      LogicDataType	      "uint(8)"
      SampleTime	      "-1"
    }
    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		      RelationalOperator
      Operator		      ">="
      InputSameDT	      on
      LogicOutDataTypeMode    "Logical (see Configuration Parameters: Optimiza"
"tion)"
      LogicDataType	      "uint(8)"
      ZeroCross		      on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Saturate
      UpperLimit	      "0.5"
      LowerLimit	      "-0.5"
      LinearizeAsGain	      on
      ZeroCross		      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		      SignalSpecification
      Dimensions	      "-1"
      SampleTime	      "-1"
      DataType		      "auto"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      SignalType	      "auto"
      SamplingMode	      "auto"
    }
    Block {
      BlockType		      Sin
      SineType		      "Time based"
      TimeSource	      "Use simulation time"
      Amplitude		      "1"
      Bias		      "0"
      Frequency		      "1"
      Phase		      "0"
      Samples		      "10"
      Offset		      "0"
      SampleTime	      "-1"
      VectorParams1D	      on
    }
    Block {
      BlockType		      SubSystem
      ShowPortLabels	      "FromPortIcon"
      Permissions	      "ReadWrite"
      PermitHierarchicalResolution "All"
      TreatAsAtomicUnit	      off
      SystemSampleTime	      "-1"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      RTWMemSecFuncInitTerm   "Inherit from model"
      RTWMemSecFuncExecute    "Inherit from model"
      RTWMemSecDataConstants  "Inherit from model"
      RTWMemSecDataInternal   "Inherit from model"
      RTWMemSecDataParameters "Inherit from model"
      SimViewingDevice	      off
      DataTypeOverride	      "UseLocalSettings"
      MinMaxOverflowLogging   "UseLocalSettings"
    }
    Block {
      BlockType		      Sum
      IconShape		      "rectangular"
      Inputs		      "++"
      CollapseMode	      "All dimensions"
      CollapseDim	      "1"
      InputSameDT	      on
      OutDataTypeMode	      "Same as first input"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      LockScale		      off
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Switch
      Criteria		      "u2 >= Threshold"
      Threshold		      "0"
      InputSameDT	      on
      OutDataTypeMode	      "Inherit via internal rule"
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	on
      ZeroCross		      on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      TriggerPort
      TriggerType	      "rising"
      StatesWhenEnabling      "inherit"
      ShowOutputPort	      off
      OutputDataType	      "auto"
      SampleTimeType	      "triggered"
      SampleTime	      "1"
      ZeroCross		      on
    }
    Block {
      BlockType		      UnitDelay
      X0		      "0"
      SampleTime	      "1"
      StateMustResolveToSignalObject off
      RTWStateStorageClass    "Auto"
    }
  }
  AnnotationDefaults {
    HorizontalAlignment	    "center"
    VerticalAlignment	    "middle"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    FontName		    "Arial"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
    UseDisplayTextAsClickCallback off
  }
  LineDefaults {
    FontName		    "Arial"
    FontSize		    9
    FontWeight		    "normal"
    FontAngle		    "normal"
  }
  System {
    Name		    "test_frequency"
    Location		    [2, 82, 1014, 721]
    Open		    on
    ModelBrowserVisibility  off
    ModelBrowserWidth	    200
    ScreenColor		    "white"
    PaperOrientation	    "landscape"
    PaperPositionMode	    "auto"
    PaperType		    "A4"
    PaperUnits		    "centimeters"
    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
    TiledPageScale	    1
    ShowPageBoundaries	    off
    ZoomFactor		    "100"
    ReportName		    "simulink-default.rpt"
    Block {
      BlockType		      Sum
      Name		      "Add2"
      Ports		      [2, 1]
      Position		      [660, 392, 690, 423]
      Inputs		      "+-"
      CollapseMode	      "All dimensions"
      InputSameDT	      off
      OutDataTypeMode	      "Inherit via internal rule"
      OutScaling	      "2^-10"
      SaturateOnIntegerOverflow	off
    }
    Block {
      BlockType		      Clock
      Name		      "Clock"
      Position		      [255, 373, 325, 397]
      DisplayTime	      on
      Decimation	      "1"
    }
    Block {
      BlockType		      Reference
      Name		      "Compare\nTo Zero"
      Ports		      [1, 1]
      Position		      [210, 210, 240, 240]
      SourceBlock	      "simulink/Logic and Bit\nOperations/Compare\nTo "
"Zero"
      SourceType	      "Compare To Zero"
      ShowPortLabels	      "FromPortIcon"
      SystemSampleTime	      "-1"
      FunctionWithSeparateData off
      RTWMemSecFuncInitTerm   "Inherit from model"
      RTWMemSecFuncExecute    "Inherit from model"
      RTWMemSecDataConstants  "Inherit from model"
      RTWMemSecDataInternal   "Inherit from model"
      RTWMemSecDataParameters "Inherit from model"
      relop		      ">="
      LogicOutDataTypeMode    "boolean"
      ZeroCross		      on
    }
    Block {
      BlockType		      Reference
      Name		      "Compare\nTo Zero1"
      Ports		      [1, 1]
      Position		      [210, 145, 240, 175]
      SourceBlock	      "simulink/Logic and Bit\nOperations/Compare\nTo "
"Zero"
      SourceType	      "Compare To Zero"
      ShowPortLabels	      "FromPortIcon"
      SystemSampleTime	      "-1"
      FunctionWithSeparateData off
      RTWMemSecFuncInitTerm   "Inherit from model"
      RTWMemSecFuncExecute    "Inherit from model"
      RTWMemSecDataConstants  "Inherit from model"
      RTWMemSecDataInternal   "Inherit from model"
      RTWMemSecDataParameters "Inherit from model"
      relop		      "<="
      LogicOutDataTypeMode    "boolean"
      ZeroCross		      on
    }
    Block {
      BlockType		      DataStoreMemory
      Name		      "Data Store\nMemory"
      Position		      [830, 120, 862, 150]
      DataStoreName	      "A"
      ReadBeforeWriteMsg      "warning"
      WriteAfterWriteMsg      "warning"
      WriteAfterReadMsg	      "warning"
      InitialValue	      "0"
      RTWStateStorageClass    "Auto"
      VectorParams1D	      off
      ShowAdditionalParam     off
    }
    Block {
      BlockType		      DataStoreMemory
      Name		      "Data Store\nMemory1"
      Position		      [880, 120, 912, 150]
      DataStoreName	      "B"
      ReadBeforeWriteMsg      "warning"
      WriteAfterWriteMsg      "warning"
      WriteAfterReadMsg	      "warning"
      InitialValue	      "0"
      RTWStateStorageClass    "Auto"
      VectorParams1D	      off
      ShowAdditionalParam     off
    }
    Block {
      BlockType		      DataStoreRead
      Name		      "Data Store\nRead"
      Position		      [295, 455, 325, 485]
      DataStoreName	      "A"
      SampleTime	      "0"
    }
    Block {
      BlockType		      DataStoreRead
      Name		      "Data Store\nRead1"
      Position		      [575, 355, 605, 385]
      DataStoreName	      "A"
      SampleTime	      "-1"
    }
    Block {
      BlockType		      DataStoreRead
      Name		      "Data Store\nRead2"
      Position		      [580, 410, 610, 440]
      DataStoreName	      "B"
      SampleTime	      "-1"
    }
    Block {
      BlockType		      DataStoreWrite
      Name		      "Data Store\nWrite"
      Position		      [505, 370, 535, 400]
      DataStoreName	      "A"
      SampleTime	      "-1"
    }
    Block {
      BlockType		      DataStoreWrite
      Name		      "Data Store\nWrite1"
      Position		      [500, 455, 530, 485]
      DataStoreName	      "B"
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Fcn
      Name		      "Fcn"
      Position		      [775, 395, 810, 425]
      Expr		      "1/u"
    }
    Block {
      BlockType		      Goto
      Name		      "Goto"
      Position		      [935, 450, 975, 480]
      GotoTag		      "F"
      TagVisibility	      "global"
    }
    Block {
      BlockType		      Logic
      Name		      "Logical\nOperator"
      Ports		      [2, 1]
      Position		      [340, 172, 370, 203]
      AllPortsSameDT	      off
      OutDataTypeMode	      "Boolean"
    }
    Block {
      BlockType		      Saturate
      Name		      "Saturation"
      Position		      [840, 395, 870, 425]
      UpperLimit	      "51"
      LowerLimit	      "49"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope"
      Ports		      [3]
      Position		      [690, 214, 750, 276]
      Floating		      off
      Location		      [5, 52, 1029, 737]
      Open		      off
      NumInputPorts	      "3"
      ZoomMode		      "xonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
	axes2			"%<SignalLabel>"
	axes3			"%<SignalLabel>"
      }
      TimeRange		      "0.02907552083333334"
      YMin		      "-350~0~0"
      YMax		      "350~6.5~7"
      SaveToWorkspace	      on
      DataFormat	      "StructureWithTime"
      LimitDataPoints	      off
      SampleTime	      "0"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope1"
      Ports		      [2]
      Position		      [960, 366, 990, 399]
      Floating		      off
      Location		      [5, 52, 1029, 737]
      Open		      off
      NumInputPorts	      "2"
      TickLabels	      "on"
      ZoomMode		      "yonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
	axes2			"%<SignalLabel>"
      }
      YMin		      "-1~50.5051"
      YMax		      "1~50.5051"
      SaveToWorkspace	      on
      SaveName		      "ScopeData1"
      DataFormat	      "StructureWithTime"
      LimitDataPoints	      off
      SampleTime	      "0"
    }
    Block {
      BlockType		      Sin
      Name		      "Sine Wave"
      Ports		      [0, 1]
      Position		      [95, 210, 125, 240]
      SineType		      "Time based"
      Amplitude		      "311"
      Frequency		      "2*50*pi"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Subsystem"
      Ports		      [1, 2]
      Position		      [440, 160, 480, 220]
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      FunctionWithSeparateData off
      MaskHideContents	      off
      System {
	Name			"Subsystem"
	Location		[2, 82, 1014, 721]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
	TiledPageScale		1
	ShowPageBoundaries	off
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "In1"
	  Position		  [315, 158, 345, 172]
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Add1"
	  Ports			  [2, 1]
	  Position		  [520, 201, 550, 234]
	  CollapseMode		  "All dimensions"
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via internal rule"
	  OutScaling		  "2^-10"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Sum
	  Name			  "Add2"
	  Ports			  [2, 1]
	  Position		  [385, 256, 415, 289]
	  CollapseMode		  "All dimensions"
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via internal rule"
	  OutScaling		  "2^-10"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant1"
	  Position		  [310, 235, 340, 265]
	  Value			  "2"
	}
	Block {

⌨️ 快捷键说明

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