There are three varieties of ecological pyramids used, including a pyramid of numbers, a pyramid of biomass and a pyramid of energy flow. Depending on which pyramid is used, any number of trophic levels can be used to denote different feeding levels.
For example, a pyramid of numbers can use four trophic levels to distinguish between producers, primary consumers, secondary consumers and tertiary consumers. In a grassland ecosystem, the grass would be a producer at the base of the pyramid. The primary consumers would be herbivores that eat the grass. Secondary consumers feed on the primary consumers. Tertiary consumers are the apex predators that feed on primary and secondary consumers.