City took the lead in the first half through Alvaro Negredo only for Swansea to respond and dominate possession for long spells.
The home side improved after the break and Samir Nasri scored twice to put the game beyond the visitors.
Speaking to Sky Sports after the Premier League game, Pellegrini said he was pleased with his players' response.
Pellegrini said: "It was another clear home win. We played against a good team. Swansea had a lot of possession especially in the first half.
"In the second half, we made a real difference and we won well in the end.
"They made it difficult and I think they have the second best possession record in the league after us.
"In the second half we defended well and scored two more goals so we are happy.
"The two we scored in the second half were impressive and we hope to improve in our next two games away from home."
Pellegrini also confirmed after the game that club captain Vincent Kompany should be fit for Wednesday's trip to West Brom.