to be honest,"可是“但是”(formal),their diffrence are not obvious in china.you can use both when writing some works.especially for composition , ,"可是“但是”are ok.you don't need to distinguish them clearly.to "不过"(informal),we usually use it in spoken chinese.you can hardly find it in the cultural works.