How to distinguish between system and user defined roles in a single database?
The column 'is_fixed_role' on sys.database_principals is your answer, check the MS document:


  If 1, this row represents an entry for one of the fixed database
  roles: db_owner, db_accessadmin, db_datareader, db_datawriter,
  db_ddladmin, db_securityadmin, db_backupoperator, db_denydatareader,
  db_denydatawriter.


Just use

SELECT * FROM sys.database_principals WHERE [type]='R' and [is_fixed_role]=1