Electrification of heavy duty vehicles (HDVs) is critical to realization of the target of carbon neutralization in the future. For most HDVs, the influence of road slope on vehicle power usually cannot be ignored due to significant road slope variation during long driving mileages. In order to design the powertrain system for electrified HDVs effectively, it is necessary to construct representative driving cycles with road slope information. There are two difficulties for this task. (1) Road slope measuring devices are usually costly. A cheaper yet effective method for measuring road slope needs to be developed. (2) A 3D (three dimension) Markov chain method is usually utilized for constructing cycles with velocity and road slope. This method is complex and time consuming, and needs to be improved. In this paper, a 2D (two dimension) Markov chain method for addressing these issues is proposed. A road slope observation is designed based on normal GPS (Global Positioning System) signals and a high order Butterworth filter. The effectiveness of the method is validated. Driving velocity and road slope are collected and observed for the area between Beijing and Zhangjiakou in northern China. Representative cycles with road slope are constructed using a 2D Markov chain method and a matching algorithm based on average speed. With the introduced technology, three representative driving cycles with road slope for urban, suburban and highway routes are designed. Statistic results on vehicle power show that, the representative driving cycles are effective with relative errors less than 4% compared to the real driving conditions. These driving cycles will be utilized in designing electric HDVs, such as hydrogen fuel cell vehicles in the future.