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

📄 sampling_101.mdl

📁 PLLmatlab for simulink
💻 MDL
📖 第 1 页 / 共 3 页
字号:
      Name		      "More Info"
      Ports		      []
      Position		      [178, 88, 300, 149]
      BackgroundColor	      "blue"
      DropShadow	      on
      ShowName		      off
      FontName		      "Arial"
      FontSize		      12
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      MaskDisplay	      "disp('Double click for\\n information on \\nSys"
"tem 1')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"More Info"
	Location		[260, 96, 1025, 430]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Annotation {
	  Name			  "Sampled  Data Systems\n(System 1)"
	  Position		  [363, 32]
	  FontName		  "Arial"
	  FontSize		  14
	  FontWeight		  "bold"
	}
	Annotation {
	  Name			  "System #1 lacks continuous time filtering ("
"bandlimiting) before the ADC and after the DAC. \nThis configuration is commo"
"nly employed in control systems applications.  The magenta  trace shows\nthat"
" result of passing the function generator signal through a perfect ADC and DA"
"C sampling at 8000 Hz. \nObviously, we have something other than a wire in th"
"e system.  The first thing one notices is the magenta signal drifts to\nthe r"
"ight as the simulation runs. This is due to the fact that the square wave fre"
"quency and the sampling frequency are\nnot related in a trivial way. In other"
" words Fs ~= k*Fsig but NOT  Fs=k*Fsig.  Change the function generator to a s"
"ine wave.\n One then sees the \"stair steps\" in the magenta trace due to the"
" most basic form of signal reconstruction: \nholding the sample value between"
" sampling instants.  \n\nClearly, this is not a time invariant system! \n"
	  Position		  [70, 75]
	  HorizontalAlignment	  "left"
	  VerticalAlignment	  "top"
	  FontName		  "Arial"
	  FontSize		  12
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "More Info1"
      Ports		      []
      Position		      [32, 68, 154, 126]
      BackgroundColor	      "black"
      DropShadow	      on
      ShowName		      off
      FontName		      "Arial"
      FontSize		      12
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      MaskDisplay	      "disp('Double click for\\n model overview')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"More Info1"
	Location		[272, 106, 1057, 499]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Annotation {
	  Name			  "The objective is to demonstrate some of the"
" effects of processing a continuous time signal by a \"real world\" \ndiscret"
"e time system. \n\nThree common sampled data system configurations are shown."
"  The systems are all \"processing\" the same \nrepetitive step input (square"
" wave). This is shown as the yellow trace on the scope block. The repetition "
"rate \nof the square wave was chosen to be 250.1 Hz and the ADC sampling rate"
" is set to 8000 Hz. Therefore, there \nare a non-integer number of samples pe"
"r cycle, as is typical in the \"real world\".  The scope block time axis\nis "
"set to be precisely one period of the input signal, and therefore the square "
"wave display (yellow) is fixed in time\nwith respect to the scope axis. This "
"is exactly equivalent to triggering a real oscilloscope on the function gener"
"ator \nsignal that is driving the system. In all cases, the digital signal pr"
"ocessing is reduced to its simplest form:\n \"a virtual wire\". Therefore DSP"
" subsystem is simply there as a placeholder to explicitly show where digital "
"\nsignal processing would occur. \n\nSince the DSP system is a \"wire\", in t"
"he ideal case, the digital system would exactly reproduce the \ninput signal "
"at its output.  for this to happen, the input signal must be sampled by by an"
" ADC at a rate that is \ntwice the signal bandwidth. The DAC must be followed"
" by  a  \"brick wall\" reconstruction filter. \nAll of these elements must ha"
"ve zero delay no less!   Clearly replacing a wire with a DSP system is not po"
"ssible,\nbut fortunately, not very desirable either! However, the unit wire d"
"oes serve as a useful example that allows \none to observe the effects due to"
" the conversion from continuous time to discrete time, and then from \ndiscre"
"te time back to continuous time. "
	  Position		  [80, 60]
	  HorizontalAlignment	  "left"
	  VerticalAlignment	  "top"
	  FontName		  "Arial"
	  FontSize		  12
	}
	Annotation {
	  Name			  "Sampled  Data Systems\n(what they may not h"
"ave told you)"
	  Position		  [363, 32]
	  FontName		  "Arial"
	  FontSize		  14
	  FontWeight		  "bold"
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "More Info2"
      Ports		      []
      Position		      [178, 188, 300, 249]
      BackgroundColor	      "cyan"
      DropShadow	      on
      ShowName		      off
      FontName		      "Arial"
      FontSize		      12
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      MaskDisplay	      "disp('Double click for\\n information on \\nSys"
"tem 2')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"More Info2"
	Location		[209, 98, 1008, 521]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Annotation {
	  Name			  "\nLeaving the source set to a sine wave for"
" the moment, it can be seen that the output from System #2 (cyan)\nlacks the "
"\"stair steps\", AND the delay from input to output appears to be a constant "
"as well. In other words, we have \nmade a better approximation to the wire, b"
"ut a the expense of introducing a delay.  Modest delay in an audio or video  "
"processing\n system is typically an acceptable tradeoff. However, it can be u"
"nacceptable in a control system where the signal\nprocessing is in the feedba"
"ck portion of the design. Delay introduces a phase shift that linearly increa"
"ses with frequency\nand this tends to de-stabilize the loop by lowering the l"
"oop phase margin. \n\nNow, change the source back to the square wave.  Two th"
"ings become apparent. \n\nFirst, there is considerable overshoot  and ringing"
" in the output. This is due to the transient response of the low pass \nrecon"
"struction filter. The elliptic filter used for this example has excellent fre"
"quency domain characteristics\n (small transition between pass-band and stop-"
"band), but poor time domain performance.  \n\nTry changing the filter to the "
"Bessel and note the improvement in the time domain. However,\nbe advised, the"
" frequency domain performance will not be as good: less alias suppression at "
"high frequencies.\n "
	  Position		  [80, 60]
	  HorizontalAlignment	  "left"
	  VerticalAlignment	  "top"
	  FontName		  "Arial"
	  FontSize		  12
	}
	Annotation {
	  Name			  "Sampled  Data Systems\n(System 2)"
	  Position		  [363, 32]
	  FontName		  "Arial"
	  FontSize		  14
	  FontWeight		  "bold"
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "More Info3"
      Ports		      []
      Position		      [182, 270, 300, 329]
      BackgroundColor	      "green"
      DropShadow	      on
      ShowName		      off
      FontName		      "Arial"
      FontSize		      12
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      MaskDisplay	      "disp('Double click for\\n information on \\nSys"
"tem 3')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"More Info3"
	Location		[210, 102, 1033, 324]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Annotation {
	  Name			  "Sampled  Data Systems\n(System 3)"
	  Position		  [363, 32]
	  FontName		  "Arial"
	  FontSize		  14
	  FontWeight		  "bold"
	}
	Annotation {
	  Name			  "\nLeaving the source set to the square wave"
", one can see output from System #3 (red), has yet more delay and more oversh"
"oot, \nBUT, exhibits a constant delay. The response does not wander in time l"
"ike systems 1&2. This system is linear time invariant. \n\nThe reason: the in"
"put has now been bandlimited by the anti-alias filter.   \nThe price: more ha"
"rdware, more delay, degraded transient response. \n \nTry changing the first,"
" and then both filters to the Bessel and note the marked improvement in the t"
"ime domain. However,\nas before, the frequency domain performance will not be"
" as good: less alias and image suppression at high frequencies."
	  Position		  [80, 60]
	  HorizontalAlignment	  "left"
	  VerticalAlignment	  "top"
	  FontName		  "Arial"
	  FontSize		  12
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "More Info4"
      Ports		      []
      Position		      [17, 310, 135, 369]
      BackgroundColor	      "black"
      DropShadow	      on
      ShowName		      off
      FontName		      "Arial"
      FontSize		      12
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      MaskDisplay	      "disp('Double click for\\n Conclusion')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"More Info4"
	Location		[177, 110, 988, 389]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Annotation {
	  Name			  "The design of practical digital signal proc"
"essing systems involves many tradeoffs. When used in feedback control systems"
",\nthe processing delay is often a critical issue.  Anti alias and Reconstruc"
"tion filters (Anti Image) can move the system performance\ncloser to \"ideal"
"\" at the expense of more hardware and input to output delay.  The choice bet"
"ween filters that have good time domain\nproperties versus those with good fr"
"equency domain properties is a sensitive function of the application. For ins"
"tance, an elliptic filter\nwould be a good choice for Software Defined Radio "
"applications because the frequency domain characteristics are typically \nmor"
"e important than the time domain. \n\nHowever, if the signal occupies a signi"
"ficant portion of the filter pass band (eg Video ) then the non linear phase "
"versus frequency \nand resulting poor transient response make filters such as"
" the Bessel variety more attractive.  Lowpass filters were used for \nthese e"
"xamples, but the results hold for the bandpass case as well. \n\nIn the end, "
"the design engineer must wrestle with these tradeoffs. \n\nThe good news: Sim"
"ulink does a seamless job of high fidelity simulations of these important eff"
"ects. \n"
	  Position		  [80, 65]
	  HorizontalAlignment	  "left"
	  VerticalAlignment	  "top"
	  FontName		  "Arial"
	  FontSize		  12
	}
	Annotation {
	  Name			  "Sampled  Data Systems\n(Conclusion)"
	  Position		  [378, 32]
	  FontName		  "Arial"
	  FontSize		  14
	  FontWeight		  "bold"
	}
      }
    }
    Block {
      BlockType		      Scope
      Name		      "Scope"
      Ports		      [1]
      Position		      [805, 199, 835, 231]
      Location		      [24, 626, 880, 830]
      Open		      on
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			" "
      }
      TimeRange		      "0.003998400639744102"
      YMin		      "-1.5"
      YMax		      "1.5"
      DataFormat	      "StructureWithTime"
    }
    Block {
      BlockType		      SignalGenerator
      Name		      "Signal\nGenerator"
      Ports		      [0, 1]
      Position		      [15, 175, 75, 235]
      WaveForm		      "square"
      Frequency		      "250.1"
    }
    Block {
      BlockType		      Gain
      Name		      "invert"
      Position		      [105, 190, 135, 220]
      Gain		      "-1"
      Port {
	PortNumber		1
	Name			"yellow"
	RTWStorageClass		"Auto"
	DataLoggingNameMode	"SignalName"
	ShowSigGenPortName	on
      }
    }
    Line {
      SrcBlock		      "Signal\nGenerator"
      SrcPort		      1
      DstBlock		      "invert"
      DstPort		      1
    }
    Line {
      SrcBlock		      "ADC_1"
      SrcPort		      1
      DstBlock		      "DSP_1"
      DstPort		      1
    }
    Line {
      SrcBlock		      "ADC_2"
      SrcPort		      1
      DstBlock		      "DSP_2"
      DstPort		      1
    }
    Line {
      Name		      "cyan"
      Labels		      [-1, 1]
      SrcBlock		      "Analog\nReconstuction Filter_1"
      SrcPort		      1
      DstBlock		      "Bus\nCreator"
      DstPort		      3
    }
    Line {
      SrcBlock		      "Analog\nAnti Alias Filter"
      SrcPort		      1
      DstBlock		      "ADC_3"
      DstPort		      1
    }
    Line {
      SrcBlock		      "ADC_3"
      SrcPort		      1
      DstBlock		      "DSP_3"
      DstPort		      1
    }
    Line {
      Name		      "red"
      Labels		      [-1, 1]
      SrcBlock		      "Analog\nReconstuction Filter_2"
      SrcPort		      1
      DstBlock		      "Bus\nCreator"
      DstPort		      4
    }
    Line {
      SrcBlock		      "Bus\nCreator"
      SrcPort		      1
      DstBlock		      "Scope"
      DstPort		      1
    }
    Line {
      Name		      "magenta"
      Labels		      [-1, 1]
      SrcBlock		      "DAC_1"
      SrcPort		      1
      DstBlock		      "Bus\nCreator"
      DstPort		      2
    }
    Line {
      SrcBlock		      "DAC_2"
      SrcPort		      1
      DstBlock		      "Analog\nReconstuction Filter_1"
      DstPort		      1
    }
    Line {
      SrcBlock		      "DAC_3"
      SrcPort		      1
      DstBlock		      "Analog\nReconstuction Filter_2"
      DstPort		      1
    }
    Line {
      Name		      "yellow"
      Labels		      [0, 0]
      SrcBlock		      "invert"
      SrcPort		      1
      Points		      [0, 0; 25, 0]
      Branch {
	Points			[0, -40]
	Branch {
	  Labels		  [-1, 1]
	  Points		  [0, -100]
	  DstBlock		  "Bus\nCreator"
	  DstPort		  1
	}
	Branch {
	  DstBlock		  "ADC_1"
	  DstPort		  1
	}
      }
      Branch {
	Points			[0, 60]
	Branch {
	  Points		  [0, 100]
	  DstBlock		  "Analog\nAnti Alias Filter"
	  DstPort		  1
	}
	Branch {
	  DstBlock		  "ADC_2"
	  DstPort		  1
	}
      }
    }
    Line {
      SrcBlock		      "DSP_1"
      SrcPort		      1
      DstBlock		      "DAC_1"
      DstPort		      1
    }
    Line {
      SrcBlock		      "DSP_2"
      SrcPort		      1
      DstBlock		      "DAC_2"
      DstPort		      1
    }
    Line {
      SrcBlock		      "DSP_3"
      SrcPort		      1
      DstBlock		      "DAC_3"
      DstPort		      1
    }
    Annotation {
      Name		      "System #1: No Alias or Reconstruction Filters"
      Position		      [438, 122]
    }
    Annotation {
      Name		      "System #2: Add Reconstruction Filter"
      Position		      [438, 222]
    }
    Annotation {
      Name		      "System #3: Add Anti-Alias and Reconstruction Fi"
"lter"
      Position		      [433, 327]
    }
    Annotation {
      Name		      "Sampling 101 \nA comparison of three common con"
"figurations."
      Position		      [392, 29]
      FontName		      "Arial"
      FontSize		      12
      FontWeight	      "bold"
    }
  }
}

⌨️ 快捷键说明

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