How to simulate a linear motor action

Hi , how do I siimulate a linear motor like the one on Telsa robot, no damping, I just want to control the motor goto some specified distance by specified velocity, such as go 5 mm by 10mm/s speed.

I did a lots of tests on damping and stiffness, can not get it work as I wanted.

when I increase the damping, the motor can not goto the right distance (less than the target distance)
when I increate the stiffness, I can not control the speed

Too confusion to work with it .

The resulting force should be computed based on this equation:

force = spring * (targetPosition - position) + damping * (targetVelocity - velocity)

See PhysX SDK manual for more information: Joints — physx 5.1.0 documentation

Regards,
Ales