  Effective quantification of the cost of flexibility and its contribution to
the system is essential for activating the flexibility of the numerous
distributed energy resources (DERs) in power systems operation. We first
propose a unified flexibility cost quantification method for heterogonous DERs
based on the adjustment ranges in both power and accumulated energy
consumption. Compared with traditional power range-based approaches, the
proposed method can reflect the potential inconvenience caused to different DER
users by flexibility activation and directly capture the time-dependent
characteristics of DER's flexibility regions. Extending to the aggregator
level, we then propose a flexibility cost formulation aligned with the
aggregated flexibility model. On this basis, a model for distribution system
operators (DSOs) is proposed to coordinate the DER aggregators' participation
in the transmission system operation for energy arbitrage and ancillary
services provision. This model derives a method for quantifying the
contribution of each aggregator's activated flexibility region to the DSO's
revenue from the transmission system, which is used to allocate the revenue to
each aggregator while ensuring that the DSO is non-profit. Numerical tests on
the IEEE 33-node distribution system validate the proposed methods.
