Unstable plant transfer function identification 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?
See the image (found in this article).

Inject a signal into the loop somewhere (I show it below as going between the controller and the plant).  Then measure the input to the plant and the output from the plant.  Note that the image is a bit confusing -- it assumes that the normal command to the loop is 0 or some constant.  It would be better to actually measure right at the output of the plant.

Then use the input to and output from the plant to estimate the plant response.

You can do this for swept sine, impulses, random noise, and steps.  If you're concerned about noise, you can take long samples -- when I do swept-sine measurements using this technique, I set things up so that I can take arbitrarily long measurements at each frequency, to make sure I can capture the real signal in the presence of noise.  If you're doing steps, you can get the response to an arbitrarily high number of steps, average, and then do ARMA or whatever method you wish to extract the plant transfer function.  Ditto random data or impulses.