The algorithms used in the database-driven SLC fast-feedback system are based on the state-space formalism of digital control theory. These are implemented as a set of matrix equations which use a Kalman filter to estimate a vector of states from a vector of measurements and then apply a gain matrix to determine the actuator settings from the state vector. The matrices used in the calculation are derived offline using linear quadratic Gaussian minimization. For a given noise spectrum, this procedure minimizes the RMS of the states (e.g., the position or energy of the beam). The offline program also allows simulation of the loop's response to arbitrary inputs and calculates its frequency response.<<ETX>>