The ability to operate a spark-ignition (SI) engine near the knock limit provides a net reduction of engine fuel consumption. This work presents a real-time knock control system based on stochastic knock detection (SKD) algorithm. The real-time stochastic knock control (SKC) system is developed in MATLAB Simulink, and the SKC software is integrated with the production engine control strategy through ATI's No-Hooks. The SKC system collects the stochastic knock information and estimates the knock level based on the distribution of knock intensities fitting to a log-normal (LN) distribution. A desired knock level reference table is created under various engine speeds and loads, which allows the SKC to adapt to changing engine operating conditions. In SKC system, knock factor (KF) is an indicator of the knock intensity level. The KF is estimated by a weighted discrete FIR filter in real-time. Both offline simulation and engine dynamometer test results show that stochastic knock control with fixed length of finite impulse response (FIR) filter has slow and excessive retard issue when a significant knock event happens. To enhance the knock control response, an integrated feed-forward and feedback knock control strategy is employed. For the heavy knock events, a combination of gain scheduling and a fast retard is applied based on the detected KF. In addition, a variable length FIR filter is used to reduce the number of combustion cycles for KF estimation. The performance of the developed knock detection and control system is evaluated on a V6 3.5L turbocharged engine on a dynamometer test stand.