We present an analysis of errors on the tensor-to-scalar ratio due to residual diuse foregrounds. We use simulated observations of a CMB polarization satellite, the Cosmic Origins Explorer, using the specications of the version proposed to ESA in 2010 (COrE). We construct a full pipeline from microwave sky maps to r likelihood, using two models of diuse Galactic foregrounds with dierent complexity, and assuming component separation with varying degrees of accuracy. Our pipeline uses a linear mixture (Generalized Least Squares) solution for component separation, and a hybrid approach for power spectrum estimation, with a Quadratic Maximum Likelihood estimator at low `s and a pseudo-C` deconvolution at high `s. In the likelihood for r, we explore modelling foreground residuals as nuisance parameters. Our analysis aims
at measuring the bias introduced in r by mismodelling the foregrounds, and to determine what error is tolerable while still successfully detecting r. We nd that r = 0:01 can be measured successfully even for a complex sky model and in the presence of foreground parameters error. However, the detection of r = 0:001 is a lot more challenging, as inaccurate modelling of the foreground spectral properties may result in a biased measurement of r. Once biases are eliminated, the total error on r allows setting an upper limit rather than a detection, unless the uncertainties on the foreground spectral indices are very small, i.e. equal or better than 0.5% error for both dust and synchrotron. This emphasizes the need for pursuing research on component separation and foreground characterization in view of next-generation CMB polarization experiments.