home *** CD-ROM | disk | FTP | other *** search
/ Best Objectech Shareware Selections / UNTITLED.iso / boss / educ / math / 017 / control.plt < prev    next >
Encoding:
Text File  |  1993-04-16  |  825 b   |  38 lines

  1. [ control.plt
  2.  
  3. paper size 11 by 8.5
  4.  
  5. #
  6. # From _Automatic_Control_Systems_, fourth ed., figure 6-14
  7. # transient response of a second-order system to a unit step input function
  8. #
  9. damp(t) = exp(-s*wn*t)/sqrt(1.0-s*s)
  10. per(t) = sin(wn*sqrt(1.0-s**2)*t - atan(-sqrt(1.0-s**2)/s))
  11. c(t) = 1-damp(t)*per(t)
  12. #
  13. #    wn is natural undamped frequency
  14. #    s is damping factor
  15. #
  16. wn = 1.0
  17. map x 0 14
  18. divi x 7,2
  19. sampling 50
  20. dummy t
  21. #
  22. # plot c(t) for several different damping factors s
  23. #
  24. color lred
  25. plot s=.1,c(t),s=.3,c(t),s=.5,c(t),s=.7,c(t),s=.9,c(t),s=1.0,c(t),s=1.5,c(t),s=2.0,c(t)
  26. color green
  27. format x 0
  28. draw x y
  29. xlabel 'time'
  30. ylabel 'response'
  31. frame
  32.  
  33. font 3
  34. char size 0.2 slant 10
  35. color lblue
  36. title 'TRANSIENT RESPONSE OF A SECOND-ORDER SYSTEM'
  37. title 'Plotting Several Functions with one Plot Command'
  38.