q angle in total knee arthroplasty how it represents patellar tracking

The patella engages the trochlear groove in 20° flexion, as the knee continues to flex the entire patella engages and the patella translates lateral and tilts medial. Patella is at greatest risk of dislocating in 30° flex (as it begins to engage), and with further flexion, bony constraint (anterior flange of LFC) prevents lateral instability.  

The forces on Patellar tracking are represented via Q angle.

The Q angle represents the force of lateral subluxation, you want to minimize this force, so a low Q angle is better.  Internal rotation of the femoral component moves the patellar groove medially relative to the tibial tubercle: this increases the Q angle.  Medializing the femoral component does the same thing.  On the tibial side, internal rotation of the tibial component causes the tibial tubercle to move lateral relative to the patellar groove and thus increase the Q angle.  Similarly, medializing the tibial component moves the tibial tubercle laterally. 

The normal Q angle is about 14° in men, 17° in women.

diagram showing internal rotation of the tibial component and internal rotation of the femoral component in TKA

The joint line height is another aspect of TKA that affects patellar tracking.  The joint line affects the tension of the entire extensor mechanism.  Raising the joint line shortens the length of the extensor mechanism and therefore changes where the patella transitions from the trochlear groove (in extension) to the intercondylar notch (in flexion). Normally the patella engages the trochlear groove at 15° flexion, enters the intercondylar notch at X°, but in the case of Patella Baja (where an elevated joint line leads to a relatively low patella) the patella enters the intercondylar notch earlier in flexion and impinges on the polyethylene causing pain, osteolysis, and limits flexion.  

Before final implantation of the components the patellar tracking should be tested.  The patella should remain within the trochlear groove, but if the patella subluxes laterally, first release the tournaqet before making adjustments to your cuts because the tournaquet can occasionally alter extensor mechanism tension and thus change the Q angle. 

The overall goal is to avoid Internal Rotation of the components.  This correlates with pain and synovitis due to patellar maltracking.