ramp up/down

hi, I´m still learning AccelStepper trying to make my motor 28BYJ-48 ramp up and down, accelerate and desacelerate gradually.
here is my problem it does not accelerate, it runs with constant speed. Also it moves only once, in other worlds, it
should turns 360° for each value of i.
Here is some observations I had with my tests:

  1. it runs the first for with constant velocity,but, the in the second for something strange appears.
    I feel the motor trembleing, but, the motor stepper does not turn at all. Also, the stepper does not get out
    from the second loop.(it should runs the 2 fors for in loop)
  2. it does not accelerate, it runs with constant speed.
  3. when I run simpleAccel(), depending on the number that I set the motor turn more than 360°, for example,
    if I set simpleAccel(250) it turns 360°(i.e, only in the first loop, the second loop does the error I`d explained)
    if I set simpleAccel(700) the first loop turns over 720° and the second loop does the error
    [while,it should turns only 360°, because I´ve set "unsigned long position = 2048)"]

#include <AccelStepper.h>
AccelStepper stepper (AccelStepper::FULL4WIRE, 8, 10, 9, 11);
unsigned long position = 2048;
void setup() {
Serial.begin(9600);
stepper.setMaxSpeed(600);
}
void simpleAccel(int steps) {
for (int i = 0; i < steps; i= i+1){
stepper.moveTo(position);
stepper.setSpeed(i);
stepper.runSpeedToPosition();
}
for (int i = steps; i > 0; i--) {
stepper.moveTo(-position);
stepper.setSpeed(i);
stepper.runSpeedToPosition();
}
}
void loop() {
simpleAccel(700);
}