  We study the effects of astrophysical foregrounds on the ability of CMB
B-mode polarization experiments to constrain the primordial tensor-to-scalar
ratio, r. To clean the foreground contributions we use parametric, maximum
likelihood component separation technique, and consider experimental setups
optimized to render a minimal level of the foreground residuals in the
recovered CMB map. We consider nearly full-sky observations, include two
diffuse foreground components, dust and synchrotron, and study cases with and
without calibration errors, spatial variability of the foreground properties,
and partial or complete B-mode lensing signal removal.
  In all these cases we find that in the limit of very low noise level and in
the absence of the intrumental or modeling systematic effects, the foreground
residuals do not lead to a limit on the lowest detectable value of r. But the
need to control the foreground residuals will play a major role in determining
the minimal noise levels necessary to permit a robust detection of r < 0.1 and
therefore in optimizing and forecasting the performance of the future missions.
For current and proposed experiments noise levels, the foreground residuals are
found non-negligible and potentially can affect our ability to set constraints
on r. We also show how the constraints can be significantly improved on by
restricting the post component separation processing to a smaller sky area.
This procedure applied to a case of a COrE-like satellite mission is shown to
result potentially in over an order of magnitude improvement in the detectable
value of r. With sufficient knowledge of the experimental bandpasses as well as
foreground component scaling laws, our conclusions are found to be independent
on the assumed overall normalization of the foregrounds and only quantitatively
depend on specific parametrizations assumed for the foreground components.
