I would like to find the transfer function of an unknown unstable SISO plant.
If it was a stable plant, I would input a sine sweep and measure the frequency response at the output; but I cannot do this since the plant is unstable.
I use a controller to get a stable closed-loop.
Methods I have tried:
Sine-sweep at the input of the stable closed-loop. Problem: I have trouble extracting only the plant (without the controller) from the closed-loop transfer function.
Add a sine disturbance (at different frequencies) at the controller output, and then estimate the gain of the transfer function from the input of the plant to the measurements of the plant by dividing the peak-to-peak of each signal, and the phase by calculating the time between the input's peak to the measurements's peak (for each frequency).
This method takes a lot of time since it requires re-tuning the controller gains for different frequencies. Otherwise, with high gains at low frequencies, the input disturbance is attenuated, or with low gains at high frequencies, the output is saturated/unstable.
Also, this method gives periodic but non-sinusoidal signals. I'm not sure I'm calculating the gain and phase of the plant transfer function correctly in this case.
I have two questions:
- Is the second method correct?
- Is there a better way to find the transfer function of an unstable plant?