"Title:Controlling the speed of a DC motor(using pwm)
Designing a system that controls a DC motor whose speed is variable. The motor will be powered by an external power source designed to output 7-25 V. The system will be capable to maintain a preset speed using the microcontroller. The RPM will be displayed on a LCD."
My reading of that does not correspond with what I posted in Reply #10 and which you confirmed in Reply #15
I would interpret the second part of that specification (the bit in green) as meaning that it should be possible to adjust the desired motor speed and that the motor should hold constant at the selected speed. One way to adjust the selected speed is with a potentiometer.
I find the first part of the specification ambiguous - it may simply mean that the input voltage could be fixed anywhere in the range 7v to 25v. I certainly do NOT interpret the specification to mean that there is any relationship between the input voltage and the speed - quite the contrary, in fact. I suggest you seek clarification on this part of the specification.
As @MarkT has suggested a PID system (or perhaps just the PI part) provides an effective way to maintain speed while the load (or the input voltage) varies.