generates a sawtooth waveform y that sweeps between –A and A with fre-
quency
0.5 * a/A. One can produce a large variety of more general periodic
waveforms by feeding
p(t) or y(t) to various function generators, as in
z = f(y) (2-28)
f(y) can be a library function, a user-defined function, or a table-lookup function.
We can frequency-modulate all these periodic waveforms by making the
parameter
a a variable. One can also add a variable bias –mod to the saw-
tooth waveform
y and send the result to a comparator whose output
z = sgn(y – mod)
is then a train of pulse width-modulated pulses (Fig. 2-15). We note here that
computer-generated sinusoidal signals
s = A * sin(w * t + phi) can also be
amplitude-, frequency-, and/or phase-modulated by making the parameters
a,
w, and phi variable.
REFERENCES
1. G. F. Franklin, Digital Control of Dynamic Systems, Addison-Wesley, Reading,
MA, 1990.
2. G. A. Korn and J.V. Wait, Digital Continuous-System Simulation, Prentice-Hall,
Englewood Cliffs, NJ, 1978.
3. G. A. Korn, Tricks and treats: Nonlinear operations in digital simulation, Math
and Computers in Simulation, 29, 1987, pp. 129–143.
4. G. A. Korn, Interactive Dynamic-System Simulation with Microsoft Windows,
Taylor and Francis, London, 1998.
5. F. E. Cellier and D. F. Rufer, Algorithm for the solution of initial-value problems,
Math and Computers in Simulation, 20, 1978, pp. 160–165.
6. F. Cellier and E. Kofman, Continuous-System Simulation, Springer, New York,
2006.
7. M. B. Carver, Efficient integration over discontinuities, Math and Computers in
Simulation, 20, 1978, pp. 190–196.
8. D. Ellison, Efficient automatic integration of ordinary differential equations with
discontinuities, Math and Computers in Simulation, 23, 1981, pp. 12–20.
9. C. W. Gear, Efficient step-size control for output and discontinuities, Transactions
SCS, 1, 1984, pp. 27–31.
10. G. A. Korn and T. M. Korn, Electronic Analog and Hybrid Computers, 2nd Ed.,
McGraw-Hill, New York, 1964.
58
Models with Difference Equations, Limiters, and Switches