air flow meter

Have 1992 audi 100 2.0E AAD uk spec which has been progressively losing power. Now the car stops at random but before it does it billows black smoke
from the exhaust - but only when the engine is at idle speed. I disconnected what I think is the air flow meter (mounted on the side of the metering head) the car will start and run a whole lot better but stutters quite a bit at low speed. I removed the metering head, but this 3 pin sensor cant be removed and seems to be part of the metering head. Is this sensor a hot wire device and can it be removed/cleaned.
Any thoughts would be appreciated
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
Add image file
Upload is a website by car enthusiasts for car enthusiasts. It is not affiliated with any of the car or spare part manufacturers or car dealers discussed here. All logos and trade names are the property of their respective owners.