Abstract:In the system of 3G IMS, online charging is an important module for charging. The rating function is a core founction of online charging system. Because 3GPP IMS charging system has to deal with complex charing intent with many services and applications, there is a high standard for desingning and implementing a rating function module. It is a hotpoint for studying rating funtion. This article suggests and realizes a model for rating funtion based on analyzing online charging system, defines complex application and service. Also, it specifies the tariff request module in rating function. At last, we test IPTV service based on the online charging system which uses this rating funtion, the testing result proves the model is feasible.