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

📄 dds_n.mdl

📁 用MATLAB中的SIMULINK工具实现DDS的仿真模型
💻 MDL
📖 第 1 页 / 共 3 页
字号:
      SaveName		      "ScopeData"
      LimitDataPoints	      on
      MaxDataPoints	      "5000"
      Decimation	      "1"
      SampleInput	      off
      SampleTime	      "0"
    }
    Block {
      BlockType		      "S-Function"
      FunctionName	      "system"
      SFunctionModules	      "''"
      PortCounts	      "[]"
    }
    Block {
      BlockType		      StateSpace
      A			      "1"
      B			      "1"
      C			      "1"
      D			      "1"
      X0		      "0"
      AbsoluteTolerance	      "auto"
      Realization	      "auto"
    }
    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		      TriggerPort
      TriggerType	      "rising"
      StatesWhenEnabling      "inherit"
      ShowOutputPort	      off
      OutputDataType	      "auto"
      SampleTimeType	      "triggered"
      SampleTime	      "1"
      ZeroCross		      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		    "dds_n"
    Location		    [2, 74, 1014, 744]
    Open		    on
    ModelBrowserVisibility  off
    ModelBrowserWidth	    200
    ScreenColor		    "white"
    PaperOrientation	    "landscape"
    PaperPositionMode	    "auto"
    PaperType		    "A4"
    PaperUnits		    "centimeters"
    ZoomFactor		    "100"
    ReportName		    "simulink-default.rpt"
    Block {
      BlockType		      Reference
      Name		      "Analog\nFilter Design"
      Ports		      [1, 1]
      Position		      [335, 142, 400, 198]
      SourceBlock	      "dsparch4/Analog\nFilter Design"
      SourceType	      "Analog Filter Design"
      method		      "Butterworth"
      filttype		      "Lowpass"
      N			      "3"
      Wlo		      "K*RF"
      Whi		      "RF*8/16"
      Rp		      "2"
      Rs		      "40"
    }
    Block {
      BlockType		      Constant
      Name		      "CONTROL \nWORD"
      Position		      [65, 170, 95, 200]
      Value		      "K"
    }
    Block {
      BlockType		      Constant
      Name		      "Constant1"
      Position		      [540, 410, 570, 440]
      Value		      "0"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Frequency of\nsingle tone"
      Ports		      [1, 1]
      Position		      [680, 468, 785, 522]
      ShowName		      off
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      MaskDisplay	      "disp('Single Tone\\nFrequency Estimator');"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"Frequency of\nsingle tone"
	Location		[181, 209, 446, 413]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "In1"
	  Position		  [110, 25, 140, 40]
	  Orientation		  "down"
	  Port			  "1"
	  IconDisplay		  "Port number"
	  LatchInput		  off
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Calculate single tone \nfrequency"
	  Ports			  [1, 1, 0, 1]
	  Position		  [90, 73, 165, 127]
	  TreatAsAtomicUnit	  on
	  MinAlgLoopOccurrences	  off
	  RTWSystemCode		  "Auto"
	  System {
	    Name		    "Calculate single tone \nfrequency"
	    Location		    [99, 524, 780, 705]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "A4"
	    PaperUnits		    "centimeters"
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "Time"
	      Position		      [40, 63, 70, 77]
	      Port		      "1"
	      IconDisplay	      "Port number"
	      LatchInput	      off
	      Port {
		PortNumber		1
		Name			"Time of current edge"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
		ShowSigGenPortName	on
	      }
	    }
	    Block {
	      BlockType		      TriggerPort
	      Name		      "Trigger"
	      Ports		      []
	      Position		      [75, 110, 95, 130]
	      ZeroCross		      off
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Constant"
	      Position		      [270, 110, 300, 140]
	      ShowName		      off
	      Value		      "0"
	    }
	    Block {
	      BlockType		      Memory
	      Name		      "Memory"
	      Position		      [125, 55, 155, 85]
	      InheritSampleTime	      on
	      Port {
		PortNumber		1
		Name			"Time of previous edge"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
		ShowSigGenPortName	on
	      }
	    }
	    Block {
	      BlockType		      Product
	      Name		      "Product"
	      Ports		      [1, 1]
	      Position		      [375, 24, 405, 56]
	      ShowName		      off
	      Inputs		      "/"
	      RndMeth		      "Floor"
	      Port {
		PortNumber		1
		Name			"Frequency"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
		ShowSigGenPortName	on
	      }
	    }
	    Block {
	      BlockType		      RelationalOperator
	      Name		      "Relational\nOperator"
	      Position		      [365, 102, 395, 133]
	      ShowName		      off
	      Operator		      "~="
	      Port {
		PortNumber		1
		Name			"Gating signal"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
		ShowSigGenPortName	on
	      }
	    }
	    Block {
	      BlockType		      Product
	      Name		      "Set to Zero\nif previous time\nwas zero"
	      Ports		      [2, 1]
	      Position		      [535, 32, 565, 63]
	      RndMeth		      "Floor"
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "Sum"
	      Ports		      [2, 1]
	      Position		      [305, 30, 325, 50]
	      ShowName		      off
	      IconShape		      "round"
	      Inputs		      "|+-"
	      Port {
		PortNumber		1
		Name			"Period"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
		ShowSigGenPortName	on
	      }
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Freq"
	      Position		      [615, 43, 645, 57]
	      IconDisplay	      "Port number"
	      BusOutputAsStruct	      off
	      InitialOutput	      "0"
	    }
	    Line {
	      Name		      "Gating signal"
	      Labels		      [2, 0]
	      SrcBlock		      "Relational\nOperator"
	      SrcPort		      1
	      Points		      [55, 0; 0, -65]
	      DstBlock		      "Set to Zero\nif previous time\nwas zero"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Constant"
	      SrcPort		      1
	      DstBlock		      "Relational\nOperator"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Set to Zero\nif previous time\nwas zero"
	      SrcPort		      1
	      DstBlock		      "Freq"
	      DstPort		      1
	    }
	    Line {
	      Name		      "Time of previous edge"
	      Labels		      [1, 1]
	      SrcBlock		      "Memory"
	      SrcPort		      1
	      Points		      [155, 0]
	      Branch {
		Points			[0, 40]
		DstBlock		"Relational\nOperator"
		DstPort			1
	      }
	      Branch {
		DstBlock		"Sum"
		DstPort			2
	      }
	    }
	    Line {
	      Name		      "Frequency"
	      Labels		      [1, 0]
	      SrcBlock		      "Product"
	      SrcPort		      1
	      DstBlock		      "Set to Zero\nif previous time\nwas zero"
	      DstPort		      1
	    }
	    Line {
	      Name		      "Period"
	      Labels		      [-1, 1]
	      SrcBlock		      "Sum"
	      SrcPort		      1
	      DstBlock		      "Product"
	      DstPort		      1
	    }
	    Line {
	      Name		      "Time of current edge"
	      SrcBlock		      "Time"
	      SrcPort		      1
	      Points		      [35, 0]
	      Branch {
		DstBlock		"Memory"
		DstPort			1
	      }
	      Branch {
		Labels			[2, 0]
		Points			[0, -30]
		DstBlock		"Sum"
		DstPort			1
	      }
	    }
	    Annotation {
	      Name		      "Ensure frequency calculation\nonly for "
"full period"
	      Position		      [507, 151]
	    }
	  }
	}
	Block {
	  BlockType		  Clock
	  Name			  "Clock"
	  Position		  [25, 90, 45, 110]
	  Decimation		  "1"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Out1"
	  Position		  [190, 93, 220, 107]
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	}
	Line {
	  SrcBlock		  "Calculate single tone \nfrequency"
	  SrcPort		  1
	  DstBlock		  "Out1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Clock"
	  SrcPort		  1
	  DstBlock		  "Calculate single tone \nfrequency"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "In1"
	  SrcPort		  1
	  DstBlock		  "Calculate single tone \nfrequency"
	  DstPort		  trigger
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Frequency of\nsingle tone1"
      Ports		      [1, 1]
      Position		      [285, 18, 390, 72]
      ShowName		      off
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      MaskDisplay	      "disp('Single Tone\\nFrequency Estimator');"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"Frequency of\nsingle tone1"
	Location		[181, 209, 446, 413]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "In1"
	  Position		  [110, 25, 140, 40]
	  Orientation		  "down"
	  Port			  "1"
	  IconDisplay		  "Port number"
	  LatchInput		  off
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Calculate single tone \nfrequency"
	  Ports			  [1, 1, 0, 1]
	  Position		  [90, 73, 165, 127]
	  TreatAsAtomicUnit	  on
	  MinAlgLoopOccurrences	  off
	  RTWSystemCode		  "Auto"
	  System {
	    Name		    "Calculate single tone \nfrequency"
	    Location		    [99, 524, 780, 705]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "A4"
	    PaperUnits		    "centimeters"
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "Time"
	      Position		      [40, 63, 70, 77]
	      Port		      "1"
	      IconDisplay	      "Port number"
	      LatchInput	      off
	      Port {
		PortNumber		1
		Name			"Time of current edge"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
		ShowSigGenPortName	on
	      }
	    }
	    Block {
	      BlockType		      TriggerPort
	      Name		      "Trigger"
	      Ports		      []
	      Position		      [75, 110, 95, 130]
	      ZeroCross		      off
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Constant"
	      Position		      [270, 110, 300, 140]
	      ShowName		      off
	      Value		      "0"
	    }
	    Block {
	      BlockType		      Memory
	      Name		      "Memory"
	      Position		      [125, 55, 155, 85]
	      InheritSampleTime	      on
	      Port {
		PortNumber		1
		Name			"Time of previous edge"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
		ShowSigGenPortName	on
	      }
	    }
	    Block {
	      BlockType		      Product
	      Name		      "Product"
	      Ports		      [1, 1]
	      Position		      [375, 24, 405, 56]
	      ShowName		      off
	      Inputs		      "/"
	      RndMeth		      "Floor"
	      Port {
		PortNumber		1
		Name			"Frequency"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
		ShowSigGenPortName	on
	      }
	    }
	    Block {
	      BlockType		      RelationalOperator
	      Name		      "Relational\nOperator"
	      Position		      [365, 102, 395, 133]
	      ShowName		      off
	      Operator		      "~="
	      Port {
		PortNumber		1
		Name			"Gating signal"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
		ShowSigGenPortName	on
	      }
	    }
	    Block {
	      BlockType		      Product
	      Name		      "Set to Zero\nif previous time\nwas zero"
	      Ports		      [2, 1]
	      Position		      [535, 32, 565, 63]
	      RndMeth		      "Floor"
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "Sum"
	      Ports		      [2, 1]
	      Position		      [305, 30, 325, 50]
	      ShowName		      off
	      IconShape		      "round"
	      Inputs		      "|+-"
	      Port {
		PortNumber		1
		Name			"Period"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
		ShowSigGenPortName	on
	      }
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Freq"
	      Position		      [615, 43, 645, 57]
	      IconDisplay	      "Port number"
	      BusOutputAsStruct	      off
	      InitialOutput	      "0"

⌨️ 快捷键说明

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