After '96 1JZ-GTE, 2JZ-GTE engines equipped with VVTi for intake camshaft.
So i have 1JZ-GTE, it is single turbo 2.5L CR=9.0, stock rated as 280hp at 165kPa.
Primary trigger VR 36-2 at crank, secondary VR 3teeth even wheel at intake cam.
Engine hardware allows to control camshaft angle in interval 60crankdeg.
"VVTi PID controller" and "Target camshaft position table" was added to firmware, some extra code for calc camshaft position was written too.
Both target pos and actual pos are present in MT log
Stock camshaft position table was captured with old known alien advance feature.
Also at cold engine we need retard camshaft for reduce VE at warmup and save fuel.
OE ECU retard camshaft at low rpm for reduce VE and knock, see my table.
Digits in table: bigger - advance, less - retard.
PID works good even without reference table.