home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / MATH / VISSIM.ZIP / PWM.VSM < prev    next >
Text File  |  1993-02-17  |  3KB  |  94 lines

  1. ; VisSim Block Diagram Format (VBDF)
  2. ; Copyright (C) 1989-1992 Visual Solutions
  3. PV=1.200
  4. PS=0
  5. PE=1
  6. PP=0.001
  7. PI=170
  8. PX=0.001
  9. PN=1e-006
  10. PF=10
  11. PD=800x600
  12. Pf=0x0
  13. Ps=1560,0,0,1065,0,0
  14. PM=1,1,1,1
  15. N.1="sampleHold"(0)@186x252<M>
  16. N.2="Compound"@0x0#1,1<C>
  17. n="pwm.bmp"
  18. Ms=1560,0,0,1065,0,0
  19. Mb
  20. N.3="step"(0,-1)@96x294<M>
  21. N.4="resetIntegrator"(0,0)@180x301<M>
  22. N.5="const"(0)@96x336<M>
  23. N.6="variable"@312x238<M>
  24. n=":Comparator reference level"
  25. N.7="summingJunction"(0)@534x245#3,1<M>
  26. N.8=">="@642x259<M>
  27. N.9="const"(0)@576x301<M>
  28. N.10="/"@264x315<M>
  29. N.11="wireLabel"@12x280<M>
  30. n="x(t)"
  31. N.12="wireLabel"@714x238<M>
  32. n="x(pwm)"
  33. N.13="*"@462x287<M>
  34. N.14="variable"@264x287<M>
  35. n=":peak ramp amplitude gain"
  36. N.15="summingJunction"(0)@360x322<M>
  37. N.16="const"(1)@312x336<M>
  38. N.17="variable"@84x476<M>
  39. n=":Comparator reference level"
  40. N.18="const"(4)@24x476<M>
  41. N.19="const"(0.1)@24x497<M>
  42. N.20="variable"@84x497<M>
  43. n=":Digital Update Time, sec"
  44. N.21="variable"@78x455<M>
  45. n=":peak ramp amplitude gain"
  46. N.22="const"(5)@24x455<M>
  47. N.23="wireLabel"@24x427<M>
  48. n="==== Parameters ===="
  49. N.24="pulseTrain"(0,0.01)@558x434#2,1<M>
  50. N.25="variable"@348x448<M>
  51. n=":Digital Update Time, sec"
  52. N.26="variable"@642x441<M>
  53. n=":Trigger"
  54. N.27="variable"@102x252<M>
  55. n=":Trigger"
  56. N.28="variable"@84x315<M>
  57. n=":Trigger"
  58. N.29="comment"@30x7@745x218<M>
  59. C="Pulse Wave Modulation Model:
  60.  
  61. The input signal, x(t), is a time varying signal with known max and min amplitude and frequency bandwidth. On input to the PWM routine, x(t) is passed through a S/H circuit to produce a piecewise linear x(t) approximation designated as x(k).  A ramp generator output producing a precision ramp voltage which has a peak to peak amplitude slightly larger than the maximum amplitude range of the input signal is added to x(k). The peak to peak amplitude is controlled by the PEAK RAMP AMPLITUDE GAIN which should be set to 1.1 times the maximum amplitude range of the input signal.    This sum is then compared with a fixed reference value (the COMPARATOR REFERENCE LEVEL).  When the sum is greater than the comparator reference level, the output PWM pulse is HIGH (1), when the sum is less than the comparator reference level, the output PWM pulse is LOW (0).
  62.  
  63. Limitations:
  64. 1.  set PEAK RAMP AMPLITUDE GAIN to at least 1.1 times the maximum amplitude range of the input signal.
  65. 2.  select     COMPARATOR REFERENCE LEVEL such that there is always an intersection with the sum of the S/H circuit and the ramp voltage. This will require one or more test runs using the desired input signal.  If this is not possible, INCREASE the PEAK RAMP AMPLITUDE GAIN.
  66. 3.  select the PWM     update time (Digital Update Time)  to a value less than 1/2 the max period of the input signal, x(t) - The Nyquist frequency.
  67. "
  68. N.30="variable"@60x371<M>
  69. n=":Digital Update Time, sec"
  70. I.1.i1=27.o1
  71. I.1.i2=2.i1
  72. G.2=1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,
  73. I.2.o1=8.o1
  74. I.4.i1=3.o1
  75. I.4.i2=28.o1
  76. I.4.i3=5.o1
  77. f7.1.i=-
  78. I.7.i1=6.o1
  79. I.7.i2=1.o1
  80. I.7.i3=13.o1
  81. I.8.i1=7.o1
  82. I.8.i2=9.o1
  83. I.10.i1=4.o1
  84. I.10.i2=30.o1
  85. I.13.i1=14.o1
  86. I.13.i2=15.o1
  87. I.15.i1=10.o1
  88. I.15.i2=16.o1
  89. I.17.i1=18.o1
  90. I.20.i1=19.o1
  91. I.21.i1=22.o1
  92. I.24.i2=25.o1
  93. I.26.i1=24.o1
  94.