How does the DA 40 NG automatically control the mixture, pitch and power by just providing one throttle?
According to Diamonds website the NG engine is a:


  Austro Engine AE 300 turbocharged common-rail injected 2.0 liter diesel engine with 168 hp and EECU single lever control system


The prop is a:


  3 blade MT hydraulic constant speed propeller features advanced blade geometry for efficient performance, low vibration and noise. It is automatically controlled by the engine’s digital engine control through a conventional hydraulic governor.


From the sounds of it, it is as close to a full FADEC (Full Authority Digital Engine Control) unit as you can get

It is controlled by a computer module just like your modern fuel injected car.