Louvered cavities are extensively employed in engineering applications. In the configurations of flow past these cavities, self-sustained oscillations will be excited. This can give rise to structure vibrations or noise. Numerical models are established to analyze excitation condition for of these oscillations. Computational results reveal that the excitation condition can be quantitatively described by the ratio of gap width G to the boundary layer thickness δ at the separation edge. When G/δ exceeds a certain critical value G/δc, self-sustained oscillations are excited. Otherwise, disturbances will dissipate and the flow configuration along the louver will be like a parallel plate flow. The critical value G/δc decreases with the ratio of G to the thickness of the louver plate H. This suggests that the excitation condition is more easily satisfied for a louver with sparse fins. The bottom boundary of the cavity restricts the feedback flow and then suppresses the excitation of self-sustained oscillations. With an increasing cavity height Hc, which reflects the distance between the louver and the bottom boundary, the critical value G/δc decreases and the decreasing rate reduces gradually. In contrast, because G/δc is relatively insensitive to the cavity length Lc, the side boundaries have no obvious influence on the excitation condition.