We have implemented a motor controller on a Piccilo MCU 28069 and need to generate phase and gain margin plots for the motor controller. We have HP dynamic signal analyzers at our disposal. Ideally we would like to have the signal analyzer inject an analog signal into the controller and have an ADC convert it to a digital value as the input into the controller. Secondly , we would like to extract the digital feedback signal send it through a DAC and have that signal fed back into the signal analyzer. From this we would like to generate gain and phase margin plots to evaluate the performance of the control loops.
Is there any practical method of accomplishing this? Has anyone generated phase and gain margin plots using a different technique?