Identification in the Frequency Domain
The other black-box route. Instead of one experiment and a Hankel matrix, run H single-sinusoid experiments and turn each into one point of the frequency response, then fit a transfer function to those points. The dataset is manufactured rather than collected — and the payoff is a model whose error is small exactly where a control design will look.
01 · Motivation
The other black-box route
Chapter 02 identified a model from a single experiment. This chapter identifies one from experiments, gets a transfer function instead of a state-space model, and costs far more test time. It exists because of where the resulting model is accurate.
Both are black-box methods; they differ in almost everything else:
4SID — time domain
One experiment. Non-parametric and constructive: no model family, no cost function, no iteration. Returns — a state-space model, which is what a Kalman filter needs.
Frequency domain
experiments, one per frequency. A classic parametric method: choose a family , define an index , optimise. Returns — a transfer function, which is what a frequency-domain control design needs.
The method follows the standard four-step parametric recipe:
- Experiment design, data collection, pre-processing
- Choice of a parametric family
- Definition of a performance index
- Optimisation,
Steps ② and ④ are shared with every other parametric method in the course. Only ① and ③ are special here, and they are what this chapter is about: step ① manufactures a dataset of complex numbers instead of collecting a time series, and step ③ measures error in the complex plane.
Why bother, if the model is the same?
In principle the transfer function you obtain is the same one a time-domain method would give. The reason to prefer this route is that identification, like any fitting, distributes its error — and this method distributes it across the frequency grid you chose. Many control techniques are designed in the frequency domain, and a controller is only as good as the model’s accuracy in the band where the loop will operate. Choosing the grid is choosing where to be right.
The running example — a car's yaw dynamics
The lectures hang the method on vehicle dynamics: the input is the steering angle , the output is the yaw rate (the car’s rotational speed about its vertical axis). A model of is what Electronic Stability Control and the lateral-dynamics controllers of autonomous cars are designed against — and those designs are done in the frequency domain, which is why the model is identified there too.
02 · The core skill
Estimating amplitude and phase from a noisy sinusoid
The most repeated question in the bank
“Describe the procedure to estimate a sinusoidal signal — its amplitude and phase — from a noisy one, assuming the frequency is known a priori.” That exact stem has been set in four separate sittings (08/01/2024, 04/09/2024, 10/02/2025 and 26/06/2026), more than any other question in the archive. It is a pure theory question worth 3 marks and it wants the reasoning below, not a number.
Note that the question bank deduplicates those four into one entry, which is why the automatic frequency analysis under-reads this chapter’s weight — the reason it carries a manual override.
Strip away the context and the problem is self-contained. You measure
with the frequency known. Recover and .
The one idea that matters
The obvious move is to fit directly by least squares. Do not. The phase sits inside the sine, so the model is nonlinear in : the cost surface is non-convex, the solution needs iteration, and it has local minima.
Instead, use the trigonometric identity in reverse. Since , the very same signal can be written
Same signal, different unknowns
and describe exactly the same set of sinusoids — nothing has been approximated. But enter linearly, because and are fixed known signals once is known. A model linear in its parameters has a quadratic cost, and a quadratic cost has a closed-form minimum.
Re-parameterising to make a fit linear is a move worth recognising in general. Here it converts an iterative optimisation with local minima into a linear solve.
Write the quadratic cost
This is the sample variance of the estimation error — the same performance index shape used everywhere in parametric identification.
Set both partial derivatives to zero
The factor cancels from both, leaving
Collect into the normal equations
A linear system whose matrix depends only on and — not on the data. Invert it once:
Convert back to amplitude and phase
From and , dividing the second by the first gives
Two forms of the amplitude formula
The lectures write the amplitude as the average of the two individually recovered values,
whereas most textbooks write . They are the same number. Both bracket equations hold exactly by construction, so each term in the average already equals , and squaring and adding , gives . Either is acceptable; the square root is safer, since the averaged form divides by or , which can be zero.
Three ways this goes wrong
- Fitting directly. The whole point of the form is to avoid a nonlinear fit. An answer that sets up an iterative optimisation has missed the question.
- Forgetting that known is load-bearing. If the frequency were also unknown, the regressors and would themselves depend on a parameter and the problem would be nonlinear again. State this explicitly — it is worth marks.
- Not resolving the quadrant of . The ratio is unchanged when both signs flip, so the arctangent alone leaves a ambiguity. The individual signs of and pick the half-plane.
Why this rejects noise
Averaging samples against a known-frequency reference is correlation, and broadband noise is asymptotically uncorrelated with a pure sinusoid. The noise contributions to the right-hand side sums partially cancel while the signal contributions accumulate, so the estimate improves like . Running the experiment longer buys accuracy — which is precisely why the method can afford to work one frequency at a time.
03 · Step ①
Designing the experiment
Step ① is asked as a question in its own right
“Describe in detail step 1 (experiment design and pre-processing) of a frequency-domain identification method” — 3 marks, set in January 2024. Together with the sinusoid question above, this chapter’s two stems span 5 of the 12 sittings in the archive. A full-credit answer covers the grid, the amplitudes, the linearity check, and the pre-processing fit, and ends by saying what step ① produces.
Choosing the frequency grid
Select excitation frequencies , usually uniformly spaced by a constant . The upper edge is bounded above by the Nyquist frequency , and in practice you want real headroom, not the bare bound: .
The lectures give a complete design chain, anchored on the expected closed-loop bandwidth of the controller you intend to build:
Identify three times past the control bandwidth, sample ten times past it, then double for the sampling frequency.
Worked: stability control in a car
The expected control bandwidth is Hz. The chain gives
So: excite up to 12 Hz, sample at 80 Hz. The 12-to-40 Hz margin is what stops measurement noise and unmodelled high-frequency dynamics from folding back into the identified band.
Choosing the amplitudes
The amplitudes may all be equal, but usually they decrease with frequency, and the reason is actuator power rather than anything statistical.
Model the actuator effort
For the steering example, torque is proportional to angle, , and mechanical power is torque times rotational speed:
Substitute the sinusoidal input
With , so :
The demand scales with the square of amplitude and linearly with frequency.
Impose a constant power budget
If the actuator has a power limit, hold constant across the grid:
The excitation amplitude must fall like — large and slow at the bottom of the grid, small and fast at the top.
A constant amplitude fails at both ends
Pick one amplitude for the whole grid and you must size it for the worst case, which is the highest frequency. That leaves the low-frequency experiments excited far below what the actuator could deliver — wasting signal-to-noise exactly where the control bandwidth is. Size it for the low end instead and the high-frequency experiments saturate the actuator, which makes the plant nonlinear and voids the method.
Running them
Perform independent experiments, one sinusoid each:
each yielding a dataset , . Wait for the transient to die before recording: the frequency response is a steady-state property.
Do not excite all frequencies at once
A broadband input would collect all the data in one run and seems obviously better. It is not what this method does, and two things break if you try. The per-frequency fit stops being a two-parameter closed-form problem, and the linearity test of §04 becomes impossible — with energy already at every frequency, you can no longer tell whether output energy at came from the plant or from your own input. One sinusoid at a time is what buys both.
The honest cost is test time: experiments means separate runs of the plant. That is the real counterweight to 4SID’s single dataset.
04 · A free diagnostic
The frequency response theorem as a linearity test
The whole method assumes the plant is linear and time-invariant. Unusually, the experiment that collects the data also checks that assumption — at no extra cost.
Frequency response theorem
For an LTI system, if the input is a sinusoid of frequency , the steady-state output must be a sinusoid of the same frequency — differing only in amplitude and phase.
The theorem is normally used as a computational tool. Turn it around and it becomes a diagnostic: an LTI system cannot create energy at a frequency that was not in its input. So if you inject a clean tone at and the output contains a visible component at or , the plant is not LTI, and every result downstream is void.
Two ways an output fails to be a perfect sinusoid — only one matters
Real outputs are never exactly sinusoidal, for two quite different reasons:
- Noise — measurement noise, internal disturbances. Broadband, uncorrelated with the input, and precisely what §02’s least-squares fit is designed to average away.
- Nonlinearity — saturation, friction, hysteresis. This shows up as energy at harmonics of , and it is not noise: no amount of averaging removes it, because it is deterministically locked to the input.
Small harmonics are tolerated — the method is explicitly looking for “the best LTI approximation” of a mildly nonlinear plant. Large ones mean the method does not apply and you should be linearising around an operating point instead.
You inject a 5 Hz sinusoid and the measured output has a strong component at 5 Hz and a clearly visible one at 10 Hz. What should you conclude?
05 · Step ①, output
One experiment, one point of the response
Each experiment has now been reduced to a clean amplitude and phase. Turning that pair into a piece of the frequency response takes one division and one exponential.
If the output is not a pure sinusoid at the input frequency, the plant is not linear — the same experiment is the test.
Experiment injected and, after cleaning, returned . Comparing input and output:
| quantity | value |
|---|---|
| amplitude gain | |
| phase shift |
and a gain together with a phase is a complex number. The estimated frequency response at is therefore
Note that the amplitude is a ratio — dividing by is what undoes the amplitude schedule of §03, so the decreasing amplitudes leave no trace in the result.
Repeat times and step ① is finished. Its output is
— complex numbers indexed by frequency. Plotted as magnitude and phase against , they are measured points of a Bode plot.
The dataset was manufactured, not collected
This is the conceptual payoff of the chapter. In time-domain identification the dataset is the raw you recorded. Here step ① transforms the raw recordings into an entirely different object: a set of complex numbers indexed by frequency, with the time axis gone.
Everything downstream — choose a model family, define an index, optimise — is then ordinary parametric identification against that new dataset. This is why only steps ① and ③ are described as “special”: they are the only two that know the data are complex.
06 · Steps ②–④
A complex-plane index that is not quadratic
With a dataset in hand, the remaining three steps are the familiar parametric ones — with one consequential difference in the performance index.
Step ② — choose a parametric transfer-function family:
Step ③ — define the performance index. Model and measurement are both complex numbers at each grid frequency, so the error is a distance in the complex plane:
— the variance of the frequency-response modelling error. Each term is the squared length of the segment joining the modelled point to the measured one, so the index penalises gain and phase errors together, in one number, without ever choosing a weighting between them.
Step ④ — optimise, , giving the final model .
Two optimisations, and only one of them is easy
This chapter contains two least-squares problems and they behave completely differently. Conflating them is the classic error.
- The inner fit (§02), estimating for one experiment, is quadratic in its parameters — a solve, one shot, no iteration, global optimum guaranteed.
- The outer fit (here), estimating , is not quadratic. The parameters sit in the denominator of , so the model is a nonlinear function of them and the cost surface has no closed-form minimum.
Step ④ therefore needs iterative numerical optimisation — gradient, Newton, quasi-Newton, or randomised methods — with all that this implies: an initial guess, convergence that is not guaranteed, and the possibility of local minima.
Deep dive Why the denominator is what breaks quadraticity
It is worth being precise about which parameters cause the trouble, because the numerator ones do not.
Write . Holding fixed, is a linear function of the numerator coefficients — each multiplies a fixed known quantity . If were known, the whole problem would collapse back to linear least squares in .
The denominator coefficients enter through a reciprocal, and is not linear in — nor is its magnitude-squared, so no re-parameterisation of the §02 kind rescues it. The residual is a ratio of polynomials in the unknowns, and the index is a sum of squared magnitudes of such ratios: smooth, but neither convex nor quadratic.
This asymmetry is the reason a family of classical methods exists that alternate between a linear solve for and an update of — and it is the same structural difficulty as the ARMAX identification of MIDA1, where the moving-average part is what forces iteration while the ARX case stays closed-form.
07 · In practice
Weighting, non-uniform grids, and unstable plants
Three refinements that come up whenever the method meets a real plant.
Focusing the fit where it matters
Sometimes one band matters far more than the rest — a lightly damped resonance the controller must not excite, say. A fit that spreads error uniformly will smooth right over such a peak. Two levers correct this, and they are worth contrasting:
Weight the index
Attach a weight to each grid point, giving
with outside the band of interest and larger inside it. Applied after the fact, costs nothing, and reuses the data you already have — but it cannot add information the experiments did not gather.
Redesign the grid
Drop the uniform and concentrate experiments in the band of interest. Decided a priori and costs experiment time — but it genuinely collects more information there, which weighting cannot fake.
The unweighted index is the special case .
Identifying an unstable plant
An open-loop experiment on an unstable system is impossible: drive it with a sinusoid and the output diverges, so there is nothing to fit. The fix is to stabilise it first.
Closed-loop identification
Design a simple stabilising controller, close the loop, and drive the reference with the sinusoid. The loop keeps the plant bounded, and you record and inside the loop — the plant’s own input and output. Those two datasets go into the identification exactly as before.
The controller is scaffolding, present only so the experiment can run. It is not part of what you identify, and the resulting model is a model of the open-loop plant — poles outside the unit circle and all.
Expecting a stable model out of a closed-loop experiment
The measured signals are well behaved, so it is tempting to expect the identified model to be stable too. It should not be, and if it is, something has gone wrong — most likely you identified the closed-loop transfer function by feeding the algorithm instead of . The plant is unstable; a correct identification says so.
Load-bearing ideas
- The four-step recipe with only ① and ③ special: step ① manufactures a dataset of complex numbers, step ③ measures error in the complex plane.
- The parameterisation trick: fit , never . Linear in ⟹ quadratic cost ⟹ a closed-form solve. Recover and . known is what makes this linear.
- Design chain: , , ; and the amplitude schedule from a constant actuator-power budget.
- The frequency response theorem doubles as a linearity test — harmonics in the output mean the plant is not LTI, and no amount of averaging will fix that.
- One experiment, one point: . of them make a measured Bode plot.
- The outer index is not quadratic — the denominator coefficients enter nonlinearly — so step ④ needs iterative optimisation, unlike the one-shot inner fit.
- Refinements: weight post-hoc or redesign the grid a priori; and identify an unstable plant in closed loop, remembering that the model that comes out is still unstable.
Exam radar. This chapter is tested as theory, not calculation — both its questions are “describe the procedure” prompts worth 3 marks each, and between them they span 5 of the 12 sittings. Be able to write §02 end to end from memory: the two parameterisations, why one is linear, the normal equations, and the conversion back. Then be able to list step ①’s four decisions — grid, amplitudes, independent experiments, sinusoid fit — and say what step ① produces.