Real Madrid have filed a formal complaint with the RFEF and Spain's CSD over the refereeing in Saturday's defeat at Espanyol.