This paper is aimed at building a framework for string stability analysis of traffic flow mixed with different cooperative adaptive cruise control (CACC) market penetration rates. In addition to the string stability, the fundamental diagram of the mixed flow is also taken into consideration for evaluating the effect of CACC vehicles on capacity. In order to describe the car-following dynamics of real CACC vehicles, the CACC model proposed by PATH is employed, which is validated by real experimental data. The intelligent driver model (IDM) is used as a surrogate car-following model for traditional manual driven vehicles. Based on the guidelines proposed by Ward[Ward J A 2009 Ph. D. Dissertation (Bristol:University of Bristol)], a framework is developed for the analytical investigation of heterogeneous traffic flow string stability. The framework presented considers the instability condition of traffic flow as a linear function of CACC market penetration rate. Following the framework, the string stabilities of the mixed traffic flow under different CACC market penetration rates and equilibrium velocities are analyzed. For fundamental diagram of the heterogeneous traffic flow, the equilibrium velocity-spacing functions of manual vehicles and CACC vehicles are obtained respectively based on car-following model. Then, the fundamental diagram of the density-velocity relationship of the heterogeneous traffic flow is derived based on the definition of traffic flow density. In addition, the theoretical fundamental diagram is plotted to show the property of traffic throughput. The numerical simulations are also carried out in order to investigate the effect of CACC vehicle on the characteristics of fundamental diagram. Besides, sensitivity analyses on CACC desired time gap are conducted for both string stability and fundamental diagram. Analytical studies and simulation results are as follows. 1) The heterogeneous traffic flow is stable for different equilibrium velocities and CACC market penetration rates, if manual driven vehicles are stable. Otherwise, the instability of traditional traffic flow is improved gradually with the increase of the CACC market penetration rate. Additionally, the stability will become better when equilibrium velocity is away from the velocity range of 9.6-18.6 m/s. 2) Because CACC vehicles can travel at free-flow speed in a relatively small headway, CACC vehicles can improve the capacity of heterogeneous traffic flow. 3) The results of sensitivity analysis indicate that with the increase of the CACC desired time gap, the stable region of heterogeneous traffic flow increases. However, the capacity of the fundamental diagram drops. Therefore, the value of the desired time gap should be determined with considering the effects of the two aspects on the heterogeneous traffic flow. It is noted that the CACC model used in this paper is based on the current state-of-the-art real CACC vehicle experiments. In the future, more experimental observations will yield new CACC models. However, the framework presented in this paper can still be used for the analytical investigation of string stability of the heterogeneous traffic flow at that time.