# How can lens focus ever be "off" in a way that AFMA fixes it?



## hgraf (Apr 19, 2013)

Here's a question that's been bugging me.

Why does AFMA fix anything? As I understand modern phase detect focus systems, focus is a closed loop sort of thing The camera tells the lens to change it's focus, and when the camera body sees things are in focus (the phase detect sensors say focus has been achieved) it stops moving the focus on the lens.

How can this "go wrong" in a way that AFMA can fix it? The way I see it is the only way things can go wrong is if the sensor is physically in the wrong spot, meaning an "in focus" in the phase detect sensor doesn't correspond to in focus at the sensor.

Where the lens is shouldn't matter?

So what am I missing?

Thanks!


----------



## neuroanatomist (Apr 19, 2013)

I believe the lens plays a role - I'm not sure it's really a closed loop with the AF sensor. Roger Cicala's data showing more accurate focusing with the more recent lenses/bodies was supported by the finding of rotational encoders on the USM lens motors. So, with older lenses (pre-2000) we had a basically open loop where the AF sensor determined magnitude and direction of the move and that was transmitted to the lens (look-move) - if the motor moved a ratio slightly off 1:1 from the instructions, AFMA would compensate. The newer lenses+bodies apparently have a closed loop where the encoder reports movement (look-move-confirm). But there may be tolerances in the encoder (e.g. detecting movement as other than a 1:1 ratio) for which AFMA could correct. I'm not positive the loop is closed with the AF sensor, i.e., look-move-confirm-look. 

Certainly, a misalignment of the AF sensor with the image sensor is one factor that AFMA corrects. I can personally attest to that - at one point, I dropped my 5DII to the pavement.  The camera was perfectly functional, but the sensor alignment changed such that all of my AFMA values (for ~8 lenses) shifted 10 units negative relative to the initial values.


----------



## Rienzphotoz (Apr 19, 2013)

neuroanatomist said:


> I believe the lens plays a role - I'm not sure it's really a closed loop with the AF sensor. Roger Cicala's data showing more accurate focusing with the more recent lenses/bodies was supported by the finding of rotational encoders on the USM lens motors. So, with older lenses (pre-2000) we had a basically open loop where the AF sensor determined magnitude and direction of the move and that was transmitted to the lens (look-move) - if the motor moved a ratio slightly off 1:1 from the instructions, AFMA would compensate. The newer lenses+bodies apparently have a closed loop where the encoder reports movement (look-move-confirm). But there may be tolerances in the encoder (e.g. detecting movement as other than a 1:1 ratio) for which AFMA could correct. I'm not positive the loop is closed with the AF sensor, i.e., look-move-confirm-look.
> 
> Certainly, a misalignment of the AF sensor with the image sensor is one factor that AFMA corrects. I can personally attest to that - at one point, I dropped my 5DII to the pavement.  The camera was perfectly functional, but the sensor alignment changed such that all of my AFMA values (for ~8 lenses) shifted 10 units negative relative to the initial values.


Interesting.
I find AFMA a bit difficult to do ... that's just me being lazy I guess ... for people like me fixing the AFMA values, by dropping the camera, sounds a bit more easier ;D


----------



## K3nt (Apr 19, 2013)

On my 7D, in the very beginning, I was wondering why some of my shots seemed to miss focus even if the camera told me it has locked on. It was best seen shooting wide open, f/2.8 or larger. Suddenly the image would be in focus slightly in front or slightly behind the subject depending on the lens. With apertures of 8 or smaller, not usually a problem as the depth of field was large enough.
I think, I do not know for sure, but AFMA corrected this because the focal plane of the sensor was slightly off with regards to where the lens was projecting the focus relative to the sensor. 
Now I can shoot wide open at any aperture with the lenses I have and focus is where I tell it to be. AFMA to my knowledge doesn't change anything in the lens, but rather tells the camera how to shift the sensor so the focal plane is aligned to different lenses. That's why you need to do it for different lenses.
Make sense?


----------



## Rienzphotoz (Apr 19, 2013)

K3nt said:


> AFMA to my knowledge doesn't change anything in the lens, but rather tells the camera how to shift the sensor so the focal plane is aligned to different lenses. That's why you need to do it for different lenses.
> Make sense?


Interesting ... so the chip in the lens does not make any adjustments to the lens, other than read command(s) off the sensor?


----------



## K3nt (Apr 19, 2013)

Rienzphotoz said:


> K3nt said:
> 
> 
> > AFMA to my knowledge doesn't change anything in the lens, but rather tells the camera how to shift the sensor so the focal plane is aligned to different lenses. That's why you need to do it for different lenses.
> ...


To my knowledge that's correct. The corrections are done in the camera body and not the lens. Auto-Focus Micro Adjustment would seem to be making sure the autofocus bits of the sensor are calibrated and not calibrating the lens. Mind you, this is just a possible scenario from a geek perspective how it would be the easiest way to implement AFMA in many camera bodies.


----------



## neuroanatomist (Apr 19, 2013)

The OP's point seems to be that if the fundamental problem corrected by AFMA is one in the camera body, the lens shouldn't matter. While I offered a couple of possible reasons the lens does matter, whether or not those reasons are correct, it's an empirical fact that the lens does matter. Different lenses (including different copies of the same type of lens) require different AFMA values to achieve optimal focus, zoom lenses require different AFMA values at different points in the zoom range to achieve optimal focus. In fact, subject distance - something not determined by camera or lens - also affects the needed AFMA value. 

As for the _execution_ of AFMA, nothing physical is shifted in the camera. It's an electronic correction factor - if the AF system would prompt the lens to move the focus elements a distance of x, the AFMA value modifies that command to x+n.


----------



## hgraf (Apr 19, 2013)

neuroanatomist said:


> I believe the lens plays a role - I'm not sure it's really a closed loop with the AF sensor. Roger Cicala's data showing more accurate focusing with the more recent lenses/bodies was supported by the finding of rotational encoders on the USM lens motors. So, with older lenses (pre-2000) we had a basically open loop where the AF sensor determined magnitude and direction of the move and that was transmitted to the lens (look-move) - if the motor moved a ratio slightly off 1:1 from the instructions, AFMA would compensate. The newer lenses+bodies apparently have a closed loop where the encoder reports movement (look-move-confirm). But there may be tolerances in the encoder (e.g. detecting movement as other than a 1:1 ratio) for which AFMA could correct. I'm not positive the loop is closed with the AF sensor, i.e., look-move-confirm-look.
> 
> Certainly, a misalignment of the AF sensor with the image sensor is one factor that AFMA corrects. I can personally attest to that - at one point, I dropped my 5DII to the pavement.  The camera was perfectly functional, but the sensor alignment changed such that all of my AFMA values (for ~8 lenses) shifted 10 units negative relative to the initial values.



Interesting, I've always assumed it was closed loop, since well, that's how I would have designed it, and all the pieces are there to close the loop. Perhaps the focus speed is hit too hard, but frankly I can't believe that since the second "look" would be nearly instantaneous. 

That said, I'm no expert, I'm sure if it's true that focus using the phase detect is open loop, Canon has a very good reason for that.

TTYL


----------



## Rienzphotoz (Apr 19, 2013)

neuroanatomist said:


> As for the _execution_ of AFMA, nothing physical is shifted in the camera. It's an electronic correction factor - if the AF system would prompt the lens to move the focus elements a distance of x, the AFMA value modifies that command to x+n.


If its only an electronic correction, couldn't the manufacturers make some software that's kinda "idiot proof" for people like me who find AFMA a bit too tedious and complex? e.g. I shoot some text using the center focus point, with the camera connected to a computer and the software analyses if Af is accurate or not and makes AF adjustments accordingly? ... does that make sense?


----------



## neuroanatomist (Apr 19, 2013)

Rienzphotoz said:


> neuroanatomist said:
> 
> 
> > As for the _execution_ of AFMA, nothing physical is shifted in the camera. It's an electronic correction factor - if the AF system would prompt the lens to move the focus elements a distance of x, the AFMA value modifies that command to x+n.
> ...



Camera manufacturers _could_, but they haven't. Reikan did, it's called FoCal. Worth every penny (or pence, in this case).


----------



## Rienzphotoz (Apr 19, 2013)

neuroanatomist said:


> Rienzphotoz said:
> 
> 
> > neuroanatomist said:
> ...


IC ... Thanks! will look at FoCal


----------



## ahab1372 (Apr 19, 2013)

hgraf said:


> Interesting, I've always assumed it was closed loop, since well, that's how I would have designed it, and all the pieces are there to close the loop. Perhaps the focus speed is hit too hard, but frankly I can't believe that since the second "look" would be nearly instantaneous.
> 
> That said, I'm no expert, I'm sure if it's true that focus using the phase detect is open loop, Canon has a very good reason for that.
> 
> TTYL


If it was closed loop, with a second look, we would be only a few steps away from a self-learning AFMA built in into the camera. Now that would be nice, wouldn't it.


----------



## Rienzphotoz (Apr 19, 2013)

ahab1372 said:


> If it was closed loop, with a second look, we would be only a few steps away from a self-learning AFMA built in into the camera. Now that would be nice, wouldn't it.


More than nice ... it'd be AWESOME!


----------



## Mt Spokane Photography (Apr 19, 2013)

Here is how I understand it. I repair simple issues with lenses, and have dissected a few ones that were totalled.

Inside the lens is a small resistive element with a wiper. The resistance changes as the focus element moves. This is converted to digital by the chip in the lens and the lens position sent to the camera. The lens chip has a table of resistance versus focus distances, it is used to determine the focus distance versus resistance reading. The lens chip can be reprogrammed by Canon or a authorized third party repair station. (Canon sells them the programmer and software to do this)

When the camera does a phase detect, it sends a command to the lens to move focus to a certain position. There can be inaccuracies in the system that add up to being slightly off focus. AFMA tells the camera to offset the command it sends to the lens so that the lens focuses slightly closer or slightly further away.


The problem lies with the linear accuracy of the element and programming in the lens. The lens will now focus correctly at the distance you adjusted it for, and might be off at other distances. If thats the case, and its too severe, Canon can adjust the lens to be accurate at multiple distances, but the user can't.

Canon cameras contain information about all the EF lenses and the commands to send to them. Third party lenses tell the camera that they are a Canon lens and then translate the command they receive to their lens. This can cause even another step that adds to inaccuracy, but it can be adjusted by AFMA as well.

Its a lot more complex that a person might think.


----------



## Drizzt321 (Apr 19, 2013)

Rienzphotoz said:


> ahab1372 said:
> 
> 
> > If it was closed loop, with a second look, we would be only a few steps away from a self-learning AFMA built in into the camera. Now that would be nice, wouldn't it.
> ...



The problem is you can't really, unless you also look at the actual image projected onto the sensor. AFMA fixes the situation where the AF detects "in focus", while due to small differences between lens + body combinations, the image projected onto the sensor is not quite in focus. So if the lens mount on the body is every so slightly thicker than the specs but still within tolerances, and the sensor is positioned ever so slightly closer to the back, then while the AF might be in focus, what is projected onto the sensor is just slightly off leading to images that might be a bit software than the might otherwise be. This is most obvious when you have a very shallow DoF, because the plane of focus is very thin where being slightly off from the focus is noticeable.


----------



## hgraf (Apr 19, 2013)

Mt Spokane Photography said:


> Canon cameras contain information about all the EF lenses and the commands to send to them. Third party lenses tell the camera that they are a Canon lens and then translate the command they receive to their lens. This can cause even another step that adds to inaccuracy, but it can be adjusted by AFMA as well.
> 
> Its a lot more complex that a person might think.



Again, all of that would be solved by closing the loop. Then all you'd need is a correction for sensor/vs AF array, which would be body specific and programmed by Canon at the factory.

It is sounding like the whole phase detect AF system is fully open loop, which really surprised me. Is Nikon like this too? Do they also have an AFMA type feature on their bodies?

Wish there were a Canon engineer I could speak to this about, would be a fascinating discussion!


----------



## Drizzt321 (Apr 20, 2013)

hgraf said:


> Mt Spokane Photography said:
> 
> 
> > Canon cameras contain information about all the EF lenses and the commands to send to them. Third party lenses tell the camera that they are a Canon lens and then translate the command they receive to their lens. This can cause even another step that adds to inaccuracy, but it can be adjusted by AFMA as well.
> ...



Even with a closed loop, you may not be able to guarantee that it will always be correct since there's long term wear and tear, if the body is sent back to be cleaned and things shift slightly...plus it'll be different if you're using it in cold weather vs hot weather since parts expand/contract and at different amounts.


----------



## Rienzphotoz (Apr 20, 2013)

Rienzphotoz said:


> neuroanatomist said:
> 
> 
> > Rienzphotoz said:
> ...


neuroanatomist, I checked Reikan website for FoCal and the price sounds reasonable ... if I get the "Pro" version, how easy or difficult is it to work with?


----------



## neuroanatomist (Apr 20, 2013)

It's easy. You do need a stable tripod, and lots of light in the target (sun or tungsten/halogen, not fluorescent or LED).


----------



## kphoto99 (Apr 20, 2013)

K3nt said:


> Rienzphotoz said:
> 
> 
> > K3nt said:
> ...



I have a Tamron lens and T4i, the lens was doing front focus. Tamron adjusted the lens to work with my body. So the lens can be modified.


----------



## Mt Spokane Photography (Apr 20, 2013)

hgraf said:


> Mt Spokane Photography said:
> 
> 
> > Canon cameras contain information about all the EF lenses and the commands to send to them. Third party lenses tell the camera that they are a Canon lens and then translate the command they receive to their lens. This can cause even another step that adds to inaccuracy, but it can be adjusted by AFMA as well.
> ...


Its not totally open loop, there is checking going on. There is information about how it works, but the fine details are not disclosed.

There are two possible types of errors.

1. The Camera tells the lens to move to 8.2 ft, but due to errors in the camera, it should actually be in focus at 8.1 ft. 

2. The lens receives a command from the camera to move to 8.2 ft but due to internal tolerances and errors, it moves to 8.3 ft. It does tell the camera when it has moved, which closes the loop.

When both of these happen, there is a significant focus error. AFMA Adjusts the camera command to compensate for this. Sometimes a lens or body error compensate and the errors cancel out. In the example above, the lens could have actually been in focus at 8.1 ft even though it told the camera that it had moved to 8.2 ft as commanded. The image would have been in perfect focus and the owner boasting that his lens was perfect and needed no AFMA!


If you send your camera and lens to Canon, they check each separately and write new parameters in the internal firmware so that both are more accurate.


----------



## cocopop05 (Apr 20, 2013)

Here are my thoughts, they may be wrong  

Contrast detection (Live view focusing, taken from image sensor itself) should be very accurate.

Phase detection (autofocus sensors, separate to image sensor) can have inaccuracies. This is where AFMA can resolve issues.

All I know is that I bought a Canon 5D MIII with 24-105 F/4 L, it was not pin sharp when using phase detection. I used the EOS utility with the tethered method (http://ophrysphotography.co.uk/pages/tutoriallensmicroadjustment.htm) to set my AMFA.

I found at all focal lengths of the zoom lens a +5 adjustment meant the sharpest results as possible.

After setting that value, the autofocus is almost always dead-on accurate.

Whether you think AFMA can in principle work or not, in practice with my experience, it is an invaluable feature.


----------



## TrumpetPower! (Apr 20, 2013)

neuroanatomist said:


> It's easy. You do need a stable tripod, and lots of light in the target (sun or tungsten/halogen, not fluorescent or LED).



Ideal and pretty easy is to put your tripod on a concrete pad like a sidewalk or your driveway and tape the target to a heavy wall like the side of your house. Do this in direct sunlight, and you've got the perfect setup for FoCal to work its magic.

Cheers,

b&


----------



## jrista (Apr 20, 2013)

hgraf said:


> Here's a question that's been bugging me.
> 
> Why does AFMA fix anything? As I understand modern phase detect focus systems, focus is a closed loop sort of thing The camera tells the lens to change it's focus, and when the camera body sees things are in focus (the phase detect sensors say focus has been achieved) it stops moving the focus on the lens.
> 
> ...



You pretty much have it. AFMA is purely an algorithmic thing, and all it does is tell the AF drive system to adjust focus by a small amount to ensure that when the mirror lifts and the image resolves, the *focus plane* is centered at the *sensor plane*. 

The reason this is necessary is simply a matter of calibration. All devices are manufactured to certain tolerances. Higher end equipment that costs more is generally manufactured to tighter tolerances, but even then, it is extremely difficult and extremely costly to keep things "perfect". There are also three separate things in play when it comes to focus...the lens, the sensor, AND the AF unit. It can be difficult to perfectly align two interacting elements of a system, let alone more than two.

You also have to realize that even at its extremes of +/- 20, AFMA is making MICROSCOPIC adjustments to the focal plane. Reality is compressed within the mirrorbox, so a significant AFMA setting is likely only adjusting the focus plane by MICROMETERS. We aren't even talking about millimeters here (changing the focus plane by a millimeter would likely result in radical defocus)...we are talking about an incredibly FINE adjustment!  It is all just a matter of calibration, and it only actually changes FIRMWARE CONFIGURATION in the body. Making an AFMA change does not actually change any physical attribute of the camera body or lens. Making AFMA adjustments on multiple different bodies for the same lens simply reconfigures each body, so the lens can still be used on each one and it should work ideally on each one once properly "calibrated."


----------



## al2 (Apr 20, 2013)

neuroanatomist said:


> It's easy. You do need a stable tripod, and lots of light in the target (sun or tungsten/halogen, not fluorescent or LED).




Neuro's comment about fluorescent and LED light sources is true for those that are equipped with old-style magnetic ballasts that operate at 60Hz. The light output fluctuates at 120 Hz and at any shutter speed faster than 1/120 there is a high probability that the image will be captured between peak light levels and the exposure will be incorrect. Fluorescent and LED lights with electronic ballasts operate at approximately 20,000 Hz, far in excess of any shutter speed you will be using.


----------



## jrista (Apr 20, 2013)

hgraf said:


> Mt Spokane Photography said:
> 
> 
> > Canon cameras contain information about all the EF lenses and the commands to send to them. Third party lenses tell the camera that they are a Canon lens and then translate the command they receive to their lens. This can cause even another step that adds to inaccuracy, but it can be adjusted by AFMA as well.
> ...



You should read Roger Cicala's LensRentals blog. He does extensive testing with lenses, and in his assessment, modern AF systems, including Canon's, ARE closed loop! Here's a good read:

http://www.lensrentals.com/blog/2012/08/autofocus-reality-part-3b-canon-cameras

And to quote, from Canon's own patent:



> In order to achieve this objective, this invention provides a camera system comprising: a first focus detection unit, a second focus detection unit, a stepping motor that drives a focusing lens, . . . or a rotation detector, which detects the rotation . . . of the motor. . . *The control circuit performs closed-loop control*, based on the output of the rotation detector to control the motor.


----------



## skitron (Apr 20, 2013)

I've often pondered the same question as OP, so dug around and found this post:

http://photographylife.com/how-phase-detection-autofocus-works

Easy read, but enough info to understand the technical.

Basically there are known and expected phase detection errors at the individual phase detect cell level and those are dealt with in code when the camera is manufactured. AFMA allows you to "mop up" at a global level.

The phase detection process as a whole is a hybrid of open and closed loops. Basically if a phase error is detected beyond what has already been documented in code during manufacturing, instructions are sent to move the lens to a specific focus. It keeps checking the results and sending further instructions to the lens until it confirms. So in this respect it is closed loop.

However, the Phase Detection sensor and the Image Detection sensor are two entirely different physical entities operating on two distinct and separate light paths. By definition, using the PD sensor to derive an ID sensor focus state is open loop in nature. An "in focus" state on the PD sensor results in an "unknown focus" state for the ID sensor evey single time. And it is only by making assumptions about the physical relationship between the PD and ID light paths and sensors that the ID sensor focus state is derived and in fact *assumed*. 

LOL, after seeing how this works I'm surprised it functions as well as it does.

The way to close all process loops is to place the PD cells in the same physical light path and focal plane as the ID cells. Seems like I heard something along those lines recently.


----------



## Mt Spokane Photography (Apr 20, 2013)

jrista said:


> .
> 
> You also have to realize that even at its extremes of +/- 20, AFMA is making MICROSCOPIC adjustments to the focal plane. Reality is compressed within the mirrorbox, so a significant AFMA setting is likely only adjusting the focus plane by MICROMETERS. We aren't even talking about millimeters here (changing the focus plane by a millimeter would likely result in radical defocus)...we are talking about an incredibly FINE adjustment!  It is all just a matter of calibration, and it only actually changes FIRMWARE CONFIGURATION in the body. Making an AFMA change does not actually change any physical attribute of the camera body or lens. Making AFMA adjustments on multiple different bodies for the same lens simply reconfigures each body, so the lens can still be used on each one and it should work ideally on each one once properly "calibrated."


 
Older DSLR's like the Canon XTi had a small set screw that let you change the position of the sub mirror. This was a mechanical adjustment for AF that was easy to do. I judt turned the screw 2 clicks with a tiny allen wrench and adjusted my AF system to be accurate. After the XTi, Canon went to all electronic adjustments on the Rebel line.

http://www.astrosurf.com/buil/autofocus/adjust.htm


----------



## neuroanatomist (Apr 20, 2013)

jrista said:


> hgraf said:
> 
> 
> > Mt Spokane Photography said:
> ...



Yes, Canon patented that. But...did they actually implement it, and if so, in which lenses and bodies?


----------



## jrista (Apr 20, 2013)

neuroanatomist said:


> jrista said:
> 
> 
> > hgraf said:
> ...



Read the article I linked. According to Roger, all of Canon's newer lenses, dating as far back as the 70-200 f/2.8 L II I think, have rotation detectors. The new generation of Canon bodies, at least the single-digit ones, seem to have improved firmware to support closed-loop operation. That includes the 1D X and 5D III at the very least, both of which score PDAF marks as high as CDAF. I am not sure if the 7D has the necessary drive firmware...there was a recent firmware update, but I don't know if that included better drive. In my experience, the 7D with the new firmware focused WAY better with the 300, 500, and 600mm Mark II lenses I rented than the 100-400mm lens. That is largely anecdotal, and it could just be the relatively poor quality of the 100-400mm lens. I couldn't say whether the 6D had closed loop operation, although I don't see why it wouldn't.


----------



## Mt Spokane Photography (Apr 20, 2013)

neuroanatomist said:


> jrista said:
> 
> 
> > hgraf said:
> ...


 
I think it may be used in the STM lens. However, that only means that the internal lens stepping motor operates as a closed loop.

A Phase Detect System for all manufacturers operates as a limited closed loop, but that only assures that the lens tells the camera that it has moved where it was told to go.

A lens cannot measure the actual distance to the subject, its calibrated and the resulting values are stored in the lens. The camera determines the distance. As others have pointed out, the thickness of the lens mount, position of the sub mirror, position of the sensor all have tolerances. The camera is calibrated at the factory to compensate for tolerance buildup as are the lenses.

However, things do go wrong and AFMA merely adjusts the offset of the focus + or -. On the 5D MK III, 1D X it allows two adjustments for zooms, wide and telephoto, and then interpolates the values between the extremes.
It the best setting for a 24-70mm lens is -2 at 24mm, and +2 at 70mm, it will set AFMA to zero at approx 47mm.


----------



## neuroanatomist (Apr 20, 2013)

jrista said:


> Read the article I linked. According to Roger, all of Canon's newer lenses, dating as far back as the 70-200 f/2.8 L II I think, have rotation detectors.



Oh, I've read it - including the part where you seem to have missed the 10 year difference between when you suggest rotation detectors were incorporated, vs. when Roger does, or maybe that's a typo on Roger's part...but it makes me wonder what was going on for those 10 years...



Roger Cicala]
If this is the case said:


> A Phase Detect System for all manufacturers operates as a limited closed loop, but that only assures that the lens tells the camera that it has moved where it was told to go.



This was my point earlier - the closed loop is 'look-move-confirm' but not 'look-move-confirm-look'.


----------



## LetTheRightLensIn (Apr 20, 2013)

jrista said:


> hgraf said:
> 
> 
> > Mt Spokane Photography said:
> ...



Apparently the rotation detector measures how much it spins and where it actually lands since the breaking of the rotation may not be perfect and it might overshoot a trace or not and then it applies a correction for how much over or undershoot it measured. Apparently the newest Canon lenses such as the 24-70 II, 24 IS, 28 IS and a few others have a higher resolution rotation detector. Apparently the lens is not able to use its own rotation detector to apply corrections internally but must send the info back to the body which then sends out a new commands to rotate a bit (and hopefully with this smaller command the new amount doesn't overshoot or undershoot to as great a degree as during the initial rotation) so apparently you also need a new body that has higher precision to be able to take advantage of the higher resolution rotation detectors and apparently that is why only the 5D3 and 1DX make use of the new ultra-precision detectors in some of the new lenses.

To be honest the whole system sounds crazily over complex and you'd think some sort of much more direct closed loop would be less prone to all sorts of issues, at least for non-AI Servo AF, but I assume they know what they are doing so there are most likely very good reasons for it all (although perhaps some are only due to the tech avail back in the 80s??).


----------



## LetTheRightLensIn (Apr 20, 2013)

neuroanatomist said:


> jrista said:
> 
> 
> > hgraf said:
> ...



My understanding is that it goes back quite a ways at the least.
However, my understanding is that only very recently did they up the precision for the rotation detector+camera body system and that only the 5D3/1DX are capable of sending back micro-precision rotation adjustments and that only lenses starting around the time of 70-300L or so release have the ultra-precision rotation detector in them. Lenses before that have a lower precision rotation detector and pre-5D3/1DX and even current but lower end bodies don't understand the extra bits of precision. I'm not sure if the lenses have always had rotation detectors or not.


----------



## hgraf (Apr 20, 2013)

Thanks all for the info, lots over very good hints and links in this thread.

So, to summarize, in case I've got something wrong:

There are basically 2 major types of error when PD focusing: 
1) Misalignment between the PD array and the sensor plane
2) Error in the lens with regards to responding to a position request, i.e. command "focus to 8.1ft" results in actual focus to 8.2ft

The first error is mostly lens independent, and should be fully accounted for during manufacture, but can result from physical changes in the body, i.e. dropping, wear, etc. Hence AFMA helps here.

The second error is almost exclusively lens dependent, and can result from a variety of factors, including error in position sensor in the lens, and physical changes in the lens, i.e. wear, dropping, etc. Here AFMA has the most important role in fixing the problem. It also explains how the 3rd party systems can correct for focus issues just by modifying firmware in the lens.

Being an engineer and having taken courses in control theory had me thinking that by "closed loop" that meant the PD array was used to close the loop, camera checks PD array, moves lens, checks PD array, moves lens, etc. until PD array reports focus.

I didn't consider that another type of closed loop is camera checks PD array, tells lens to move to a position and lens reports done. While technically closed loop, it isn't as simple as the first case, and exposes the system to more sources of error.

Engineering is all about compromise, so the fact that Canon does it the way it does points to there being a benefit to the more complicated method, my guess would be speed.

It's similar to how the contrast detect focusing in live view is "slow", contrast detect doesn't deliver as reliable a "your focus is off by this much" sort of error signal, so the loop is closed by the contrast detect, hence the hunting you see while in live mode.

So thank you all for clearing this up for me!

One last question: how does Nikon do it? Does it also have an AFMA type tool?

Thanks!


----------



## friedmud (Apr 20, 2013)

Nikon is similar. AFMA is called "AF Fine Tune".

I found this thread informative... my Nikon D600 is spot on wih my 50mm 1.8G and my 70-300... but is quite off at the wide end of my 24-70 f/2.8. I'm sending it in for adjustment soon (after the next round of trips) but I could never work out how the focus could be perfect for all of my other lenses and be off for one. This thread definitely gave some insight into that!


----------



## Rienzphotoz (Apr 20, 2013)

TrumpetPower! said:


> neuroanatomist said:
> 
> 
> > It's easy. You do need a stable tripod, and lots of light in the target (sun or tungsten/halogen, not fluorescent or LED).
> ...


neuroanatomist & TrumpetPower, Thanks


----------



## jrista (Apr 20, 2013)

neuroanatomist said:


> jrista said:
> 
> 
> > Read the article I linked. According to Roger, all of Canon's newer lenses, dating as far back as the 70-200 f/2.8 L II I think, have rotation detectors.
> ...


----------



## neuroanatomist (Apr 20, 2013)

I think the situation may be a bit more complex than that. One observation I made when doing manual AFMA (LensAlign Pro) with the 85L II (a lens with AF slow enough that one can actually observe the focusing with the focus distance window) was that the 7D seemed to lock on faster (or at least in a different manner, I didn't time it) than the 5DII. Specifically, when focusing from infinity or MFD, the 7D would move the focusing group in one direction then stop, whereas the 5DII would consistently overshoot by a little bit, then move slightly in the opposite direction.


----------



## jrista (Apr 20, 2013)

neuroanatomist said:


> I think the situation may be a bit more complex than that. One observation I made when doing manual AFMA (LensAlign Pro) with the 85L II (a lens with AF slow enough that one can actually observe the focusing with the focus distance window) was that the 7D seemed to lock on faster (or at least in a different manner, I didn't time it) than the 5DII. Specifically, when focusing from infinity or MFD, the 7D would move the focusing group in one direction then stop, whereas the 5DII would consistently overshoot by a little bit, then move slightly in the opposite direction.



Usually my 7D will focus in a single movement, but that is not always the case. There are times when it will make on big move, then one or two small moves, then issue AF lock confirmation in the viewfinder. It is usually VERY quick at it, but you can just barely feel the lag and see those last couple of movements. I have my AF button set to a rear button on the body, so it is separate from the shutter button, so there is no confusion about what is causing the movements.

If Canon still used an open/partial open AF system, I don't believe the secondary movements would occur. I have not used a 1D X, so I am not sure if it might do the same thing at times. It has a vastly superior AF system as well, so the chances that you even need a second or third movement are probably so low as to be practically unheard of...especially with newer lenses that have updated electronics and firmware to support a more accurate AF system overall.


----------



## Mt Spokane Photography (Apr 21, 2013)

hgraf said:


> I didn't consider that another type of closed loop is camera checks PD array, tells lens to move to a position and lens reports done. While technically closed loop, it isn't as simple as the first case, and exposes the system to more sources of error.
> 
> Engineering is all about compromise, so the fact that Canon does it the way it does points to there being a benefit to the more complicated method, my guess would be speed.
> 
> ...


Phase detect operates in basically the same way for all Cameras. It is old technology. A closed loop will still be inaccurate as well as slow. Remember, the check done by the PD array does not mean the subect is in focus.

Contrast detect, which uses the actual sensor photosites to compute focus is the closed loop type of focusing. Its painfully slow because of all the checking and back and forth searching. It often starts searching in the wrong direction.

Some of the newer Canon models now use a hybrid focusing method. Phase Detect pixels are embedded in the sensor, and tell the contrast detection system where to look for sharpest focus. The drawback for DSLR's is that the mirror must be up, so there is no visibility thru the viewfinder to be able to track the subject.

Mirrorless cameras get around this by using EVF technology which is improving with every new version. They are still very slow to focus where large sensors are involved. Small sensors might only use three to five lens positions to cover focus, so they are much quicker. The very deep depth of field makes this work.


----------

