# choosing drive signals for system identification?

(I'm just learning a little about system identification so apologies in advance if this question is badly worded)

How do you go about choosing drive signals for system identification? I've seen PRBS signals used but it seems like that's going to work well for frequencies around the chip rate but not really low frequencies; I've also seen frequency sweeps.

If I have a SISO system that I know is close to a 2nd order linear system with poles in a certain range, and I can drive it with an arbitrary signal up to some amplitude A for up to some time length T, how do I pick a signal that would give me the best responses for determining the accuracy of the transfer function?

I tried googling for "system identification drive signals" but I don't see anything that pertains to my question.

edit: one particular type of SISO system I've dealt with is an (input=power dissipation, output=temperature) system for power semiconductor thermal behavior, and it seems very hard to model because there's usually a dominant pole at very low frequencies (<1Hz) and the next one might be 100 times higher, so any high-frequency drive signals just get very heavily attenuated.

If by system identification you mean determining the impulse response of a linearized model of your actual system, then pseudorandom binary sequence (PRBS) signals are a good way to go. With chipping rate $T^{-1}$ and $N$ chips in each period of the PRBS, the PRBS signal has period $NT$ seconds, and it is important to choose $N$ and $T$ so that period of the PRBS signal is quite a bit longer than what you believe is the duration of the impulse response. Then, the periodic (or circular or cyclic) cross-correlation function of the periodic input signal and the periodic output signal computed over a full period is exactly equal to the response of the linearized model to the periodic autocorrelation function of the PRBS signal which is essentially a periodic "impulse train" with one "impulse" every $NT$ seconds. Of course, it is not a true impulse, but if the PRBS signal has levels $\pm A$ where $A$ is necessarily chosen to be small so as to not drive the system into nonlinearity, the "impulse" has peak value $ANT$ (and floor or off-peak value $-AT$). So you effectively have a "processing gain" of $N$. If the "impulse response" dies out before the next "impulse", that cross-correlation is essentially the impulse response or something close enough to it for gummint purposes.

Once you have computed the impulse response, you can get the transfer function from the impulse response.

More bells and whistles: if you complement alternate chips of the PRBS to get a sequence of period $2N$ chips, the autocorrelation function is again a periodic "impulse train" of twice the period, but the impulses still occur every $NT$ seconds with alternate signs. This allows the testing of the system with both positive and negative impulses since the actual nonlinear system being modeled might not be perfectly linear around the operating point, and the gain for positive signals might be slightly different from negative signals.

• So it's pretty clear from your answer that you want to make N large. But how do you pick T? I mean a 1MHz chip rate on a system with poles in the 1-100Hz rate seems like a bad idea. – Jason S Apr 20 '12 at 21:49
• What would the response of your system be to a 1 MHz pulse train? The "impulses" in the PRBS idea are $2T$ wide at the base and $ANT$ tall, and so $T$ should be small enough that this looks reasonably enough like an impulse to the relatively slower system, while $N$ should large enough to get a tall spike. – Dilip Sarwate Apr 20 '12 at 22:15
• response of 1MHz pulses would be so far down in the noise floor I'd never be able to sense them. – Jason S Apr 20 '12 at 22:16
• @JasonS It is not the response of the system to the input that is directly of concern but the cross-correlation of the input and output which has to be computed over long period of time. So even if the output signal is buried in the mud as you call it, it does not matter: that long period of integration/summation gets all the signal components to add coherently and the noise to add incoherently. Think of spread-spectrum where the signal is buried in the noise (useful for covert communication) and the processing gain pulls the signal out (continued) – Dilip Sarwate Apr 21 '12 at 1:31
• (continued) or the reason why one averages measurements of a parameter: the sample mean has variance lot smaller than an individual measurement/sample because the signals add while the noise variances add and so the standard deviation of the noise goes down by a factor of $\sqrt{n}$. Same effect is helping here. – Dilip Sarwate Apr 21 '12 at 1:35

For linear systems, you can completely characterize the transfer function using its frequency response, so a frequency sweep would be one possible choice. However, you would need to ensure that at each test frequency, you allow time for the system's transient response to die out before measuring its steady-state amplitude/phase response.

The below thoughts are to be regarded as very unreliable: my knowledge of control theory is meagre at best!

Well, if the system is insensitive to your test input around 100Hz will it be sensitive to control signals of that frequency when in normal operation? If not - model it as a first order system.

how do I pick a signal that would give me the best responses for determining the accuracy of the transfer function?

They use impulses, steps, sines - I have no idea which of the how accurate is, though I guess that depends on the bottleneck in your experiment.

For example, with the slow chip heating, you can measure time with high relative precision, but you are limited by your ADC when measuring magnitudes. I would pass in a high amplitude 100Hz sin in for less than a second (the system's dominant time constant) and determine a first order model gain (time constant is already defined as 1/100 s). If the gain is small, I would neglect this pole, if it is of significant size for the problem at hand, look for a second order model (as you are doing in this question ;P)

If you have two sequences of input and output samples and you use least squares you need your input to persistently explore the input space, i.e. you have to invert matrix $H^T H$ being $$H = \begin{pmatrix} y(n) & y(n-1) & \dots & y(1) & u(n) & ... & u(1)\\ y(n+1)&y(n) & \dots &y(2) & u(n+1) & \dots & u(2)\\ \vdots & \vdots & & \vdots &\vdots &&\vdots\\ y(L-1) & y(L-2)& \dots &y(L-n-1) & u(L-1) &\dots & u(L-n-1) \end{pmatrix}$$

so a good sequence will be a sequence of uncorrelated samples, for example a white noise sequence