I have an quadrature encoder. my minimum and maximum positions are fixed, and I can count the relative position. If my encoder is mid way, looses power and is then restarted, how can I know my current position, without the encoder starting the count again from zero
Remember that even a powered down elevator can be moved manually, generally you open the isolator, stick a leaver in a hole in the brake housing and then wind the motor over by hand with a crank. The gear ratio makes it painful to do over any distance, but if you got people stuck in a lift, it can be done (Usually there is a card inside the motor compartment with instructions for manual winding).
Even if the car could not be moved manually, a car in movement when the grid drops out will NOT stop instantly, and how far it will move depends on speed and load (In a non obvious way, there is a counterweight and a considerable mass of cable in play) and I would NOT ever assume anything about the state of the system at power up.
Homing to a limit switch works, but really there is little wrong with a cam operated microswitch or two at each floor (Plus a couple of over travel switches at each end), and that has the considerable virtue of simplicity and robustness.
Elevators have LONG service lives (30 years plus in many cases), and a simple system will be fixable long after the original designer has died and the original company gone out of business, something too clever, much less so. For this reason you still see simple switches with one wire per floor used widely and superficially simpler things like running a CAN bus for the call points is less popular then you would expect.
The one place you sometimes see incremental encoders is in the electrical overspeed sensor, generally a pully at the top and bottom of the shaft with a speed sensor fitted and a loop of wire run around and attached to the car.
Lasers and ultrasound both strike me very much as piss poor engineering for this sort of thing, I could MAYBE see optical beam break at each floor (But cleaning it would be a pain), or maybe magnets clipped to the overspeed sense cable and read at the top pully (gets all the electronics out of the shaft), but anything more then that just feels like something to break and be hard to repair.
The only reliable way is to have an end-stop switch. You move the motor in one direction (slowly) until it hits the end-stop and stop. At that point you set the quadrature encode value (Often to zero but you can use any number).
This method is fail-safe because you don't know if the position has changed while there was no power.
You will notice this behavior if you power-up any scanner and the scan 'wagon' is not already in the end-position.