The Brazilian full-back appeared to struggle during the opening 45 minutes in the Bernabeu and was eventually booked for a foul that he committed on Mesut Ozil.
However, he responded in the second half with a much stronger performance and Ferguson has admitted that he never doubted the 22-year-old's ability.
"Obviously Rafa had a trying first half but he coped well in the second half. He calmed down," Ferguson told MUTV. "He's a very impetuous boy. He's enthusiastic and wants to win every ball and, of course, he committed himself far too early on a lot of occasions.
"In the second half, he was back to the form he has shown all season and he did really well. For a young boy to recover like that says a lot for him so that was pleasing to get that second-half performance out of him."
Rafael has made 29 appearances in all competitions this season.