Copter Control Architecture

Dear Community,
I want to simulate the copter’s exact PID control architecture for my research work which is into PID tuning.
Can you please point out to any resource/manual where I can find the documentation that shows what goes into the codebase?

Thake a look at the system identification documentation and at my analytical PID optimization blog post in this forum.
We at IAV GmbH also contributed a simulink model of ArduCopter into ArduPilot codebase at GitHub