a method dynamically allocates bandwidth for traffic having a variable data rate in a network . a data rate of the traffic received from the network is measured during fixed length time intervals . a predetermine number of consecutive data rates are grouped into overlapping vectors . a discrete wavelet transform is applied to each overlapping vector to determine frequency bands for each vector , and the frequency bands of each vector are analyzed to determine an associated energy of the data rate . then , the bandwidth is allocated to the traffic according to the associated energy when the traffic is transmitted .