Systems and Models - Mock Exam 5
Questa pagina non ha ancora la versione ripasso: qui sotto c'è il testo completo.
In questa pagina 6
The written tests of this course are not public. The official format, from the course description, is a written test of 2 hours and 30 minutes with five exercises: formulating mathematical models, analysing systems in state space, identification, validation of models with experimental data, and critical interpretation. This mock exam follows that list: Exercise 1 is about modelling and a first validation on measured data, Exercises 2 and 3 about state-space analysis (a continuous-time and a discrete-time LTI system), Exercise 4 about identification, Exercise 5 about the critical reading of two tests of stability. The distribution of the points (6 points per exercise, 30 in total) is a proposal of this site, not an official rule. The test is built only on the notes of the course; it is not a copy of any real test, and all systems and data are new.
Conventions used in the whole test: the notation of the course is used ( state, input, output, state matrix, input matrix, output matrix, transfer function, a.s. = asymptotically stable). Every system and every data set is listed completely, so that the figures can be redrawn on the sheet before starting.
How to use it: work with a timer, write each formula in letters before the numbers, and look at the "Result" only when a question is finished. Some parts ask for a comment: the "Solution" says which sentences of the notes support it, and marks as "Reading" the places where two notes are joined.
Exercise 1 (points 6)
An RC ladder is built as follows. An ideal voltage source (in V) is connected to the resistor ; the other end of is the node , which is connected to ground by the capacitor and to the node by the resistor ; the node is connected to ground by the capacitor , and nothing else is connected to . The output is the voltage of the node with respect to ground. Data: , , , ; times are measured in ms (the product kF is a ms).
a) Write the circuit laws at the two nodes and choose as state the capacitor voltages . Obtain the model , with numerical matrices (2 points).
b) For the constant input find the equilibrium. Compute the eigenvalues and the eigenvectors of , the time constants, and say whether the system is a.s. and whether the modes oscillate (2 points).
c) At the capacitors are discharged, , and the input is the step for . Write using the eigenvectors and compute the predicted at ms. The voltage was then measured on the real circuit (resolution V): , , at the same times. Compute the differences measured minus predicted and comment (2 points).
Show the result
a) , , : , , .
b) V. Eigenvalues and , with eigenvectors and ; time constants ms and ms; a.s., real eigenvalues, no oscillation.
c) , . Predicted ; measured minus predicted : all negative, larger than the resolution; the model with the nominal values is too fast.
Show the full solution
a) Model. Apply the laws of the circuit as in the RLC example of Examples of State-Space ModelsWorked state-space models: an RLC circuit, a controlled pendulum, population growth (exponential and logistic, continuous and discrete time), a three-class lab cell population and the Google PageRank iteration.Examples of State-Space Models →. The current in is and the current in is ; the capacitor currents are and . At the node the current coming from splits into the capacitor and the resistor ; at the node all the current of goes into :
With , , solving for the derivatives (see State-Space ModelsA state-space model describes a system with a state vector, an input and an output; it can be nonlinear, control-affine or linear (LTI or LTV), in continuous or discrete time.State-Space Models →):
The products are , , , so , , in :
Typical mistakes: forgetting that also appears in the equation of node (the coupling term loads the first capacitor); mixing the units (with k and F the rates come out in ).
b) Equilibrium and eigenvalues. For a constant input the equilibrium solves (Transfer Matrix of Continuous-Time LTI SystemsThe Laplace transform turns an LTI state-space model into the transfer matrix W(s) equal to H times the inverse of sI minus F times G plus J, which is invariant under a change of state basis, has the modes of the system as poles, and can hide modes through zero-pole cancellations.Transfer Matrix of Continuous-Time LTI Systems →, stability with constant inputs). The second row gives , so ; the first row then reads , i.e. . So V: in steady state no current flows in the resistors and both capacitors are charged to the source voltage. The matrix is invertible (), so this equilibrium is unique.
Eigenvalues: , ,
Eigenvectors (Linear Algebra Recap - Eigenvalues and DiagonalizationRecap of linear algebra needed for LTI systems: linear functions, bases and the matrix of a linear map, change of basis and similarity, diagonalization, eigenvalues and eigenvectors, characteristic equation, algebraic versus geometric multiplicity.Linear Algebra Recap - Eigenvalues and Diagonalization →): for , is , giving ; for , , giving . The two eigenvalues are real, distinct and negative: the modes are and , with no oscillation, and the system is a.s. (Modes and Asymptotic Behaviour of LTI SystemsThe state of an LTI system is a linear combination of modes t^k e^(sigma t) cos(omega t); the real part of the eigenvalues decides whether all modes converge, stay bounded or diverge, illustrated on the pendulum with and without friction and upside down.Modes and Asymptotic Behaviour of LTI Systems →, Equilibrium and Stability of LTI SystemsDefinitions of equilibrium, simple stability and asymptotic stability (local and global), two counterexamples (Van der Pol oscillator, Vinograd system), and the stability conditions for LTI systems in terms of the eigenvalues of F.Equilibrium and Stability of LTI Systems →). Time constants : ms and ms. Typical mistake: expecting an oscillation because the circuit contains two storage elements (oscillations need complex eigenvalues, and here the discriminant is positive).
c) Step response and comparison with the data. The deviation satisfies with . With distinct eigenvalues , and the initial condition gives
Therefore
(check: ). The output is . At : , , V. At : , , V. At : , , V. The differences measured minus predicted are
Comment. The three differences have the same sign and each is much larger than the resolution of the instrument ( V), so they are not noise: the model with the nominal values predicts a voltage that rises faster than the real one (the relative errors are about , and percent). A possible cause, to be tested and not to be taken as proved, is that the real components differ from their labels, which changes the eigenvalues. Reading, built on the notes: the data were not used to build the model, so this is a first check of how the model predicts; a model that is wrong in the parameters can be improved by estimating them from the data (Least Squares Estimation - Linear and Weighted Least SquaresThe least squares estimator minimises the sum of squared deviations between observed and predicted outputs; for models linear in the parameters it has a closed form given by the normal equation, extended to weighted least squares and illustrated on a straight-line fit and on a DC motor.Least Squares Estimation - Linear and Weighted Least Squares →), but then new data are needed to check again, because least squares only minimises the mismatch on the data it has seen. Three points are also a weak check. Typical mistake: using as initial condition of the deviation (it is ).
Exercise 2 (points 6)
Consider the autonomous system with time in s and
a) Compute the characteristic polynomial, the eigenvalues, and the algebraic and geometric multiplicity of each of them (use the rank of ). Write the Jordan matrix , find an eigenvector for each eigenvalue and a generalized eigenvector completing the chain, build and check (2 points).
b) Compute and the solution for . Which modes appear? The component starts at : find the time at which it is largest and its value, and comment, since the system is a.s. (2 points).
c) Two outputs are measured: and . Which modes appear in each of them, for every initial state? Show that and give and for the initial state of part b) (2 points).
Show the result
a) . : algebraic and geometric multiplicity . : algebraic multiplicity , , geometric multiplicity : one block of size . ; eigenvectors for and for , generalized eigenvector with ; .
b) and ; modes , , . The component is largest at s with value , then decays: a.s. does not mean monotone decrease.
c) for , so and only the mode appears: ; , only the mode . The mode never appears in either output.
Show the full solution
a) Jordan structure. Expanding along the first row, which is , gives . The eigenvalues are (algebraic multiplicity ) and (algebraic multiplicity ). The geometric multiplicity is (Jordan Canonical FormEvery square matrix is similar to a Jordan matrix of blocks with the eigenvalue on the diagonal and ones above it; generalized eigenvectors built from kernel chains give the change of basis, and the exponential of a Jordan block contains the terms t^k e^(lambda t).Jordan Canonical Form →):
The rows and are equal and the first row is independent of them, so and the geometric multiplicity of is : is not diagonalizable, and has one Jordan block, of size . For the geometric multiplicity is (it cannot exceed the algebraic one and is at least ). Therefore
Eigenvector for : with gives and , so : . Eigenvector for : gives and , so . Generalized eigenvector: the chain of a block of size asks , that is : the first row gives and the second ; choose (any other choice differs by a multiple of ). Check that is not an eigenvector: , while . Taking the columns in the order of the blocks,
Check of , column by column: ; ; and , which is the third column of ( with ). Typical mistakes: stopping at the characteristic polynomial and writing without the rank computation; taking for the generalized eigenvector a solution of (that is an ordinary eigenvector).
b) Matrix exponential and solution. As in Jordan Canonical FormEvery square matrix is similar to a Jordan matrix of blocks with the eigenvalue on the diagonal and ones above it; generalized eigenvectors built from kernel chains give the change of basis, and the exponential of a Jordan block contains the terms t^k e^(lambda t).Jordan Canonical Form →, (the block of size with eigenvalue ). Then has columns , and , and multiplying on the right by :
Check: at it is , and differentiating each entry and putting (for instance and ) gives exactly , as it must since . For the coordinates in the basis of are , and
The modes are , and (Modes and Asymptotic Behaviour of LTI SystemsThe state of an LTI system is a linear combination of modes t^k e^(sigma t) cos(omega t); the real part of the eigenvalues decides whether all modes converge, stay bounded or diverge, illustrated on the pendulum with and without friction and upside down.Modes and Asymptotic Behaviour of LTI Systems →); all eigenvalues have negative real part, so ( is a.s., Equilibrium and Stability of LTI SystemsDefinitions of equilibrium, simple stability and asymptotic stability (local and global), two counterexamples (Van der Pol oscillator, Vinograd system), and the stability conditions for LTI systems in terms of the eigenvalues of F.Equilibrium and Stability of LTI Systems →). The component starts at . Its derivative is , which is positive at () and vanishes where : at the two sides are and , so s, with . The component grows by percent before decaying: the polynomial mode (with coefficient ) dominates at first and the exponential dominates later; a.s. is a statement about the limit , not about monotone decay. Typical mistakes: writing (forgetting and ); writing instead of in the entry above the diagonal of the block.
c) Modes seen from the outputs. Write with . The product is the second row minus the third row of : . Then, for every trajectory,
So for every initial state only the mode appears in (equivalently : the row , as the matrix of part b) shows); the modes and , present in the state, are invisible in this output, the situation of the exercise on the modes seen from the output in Matrix Exponential - Worked ExamplesTwo exercises show how to find the Jordan structure of a state matrix, compute the matrix exponential through the inverse Laplace transform of sI minus F inverse, and decide which modes are seen from the output.Matrix Exponential - Worked Examples →. For : and , which agrees with . For the first equation is closed: , only the mode ( also satisfies ). The mode appears in neither output, although it is the one responsible for the overshoot of in part b). Typical mistake: assuming that every mode of the state appears in every output.
Exercise 3 (points 6)
Consider the discrete-time systems , , with
a) For compute the characteristic polynomial and the eigenvalues, their modulus and angle , and write the modes in the form . Say whether is a.s. and what is the number of steps of one oscillation. If the sequence were made of the samples, at , of the modes of a continuous-time system, which would be the eigenvalues of that system (2 points)?
b) For write in closed form, check it for , and find the first time at which (2 points).
c) For and write the three components of . Which mode dominates for large ? After how many steps are the first two components and the third one below in absolute value (2 points)?
Show the result
a) , , , (); modes and ; a.s. (); one oscillation every steps. The continuous-time eigenvalues would be .
b) : , ; , equal to at and at : the first time is .
c) , , . The dominant mode is (modulus ), alternating in sign. The norm of the first two components is below from (, while ); the third component is below in absolute value from (, while ).
Show the full solution
a) Eigenvalues and modes. The trace is and the determinant is , so and
Write (Modes and Convergence of Discrete-Time SystemsDiscrete-time modes are samples of continuous-time modes through the map lambda bar equals e to the lambda, and a mode t to the k times rho to the t times cosine of theta t converges to zero when rho is below one, stays bounded when rho equals one with k equal to zero, and diverges otherwise.Modes and Convergence of Discrete-Time Systems →): and rad. Since , the modes of are and , with (the two eigenvalues are distinct). In discrete time a mode converges to zero if , so is a.s. (Equilibria and Stability of Discrete-Time LTI SystemsA discrete-time LTI system is asymptotically stable when every eigenvalue has modulus below one, stable when all modes are bounded, and unstable otherwise, and its equilibria solve an algebraic equation involving I minus F, with finite-time convergence possible when all eigenvalues are zero.Equilibria and Stability of Discrete-Time LTI Systems →); here . The cosine repeats when increases by , that is every steps. For the second question use the correspondence between the modes of the two time scales: the CT mode sampled at the integers is the DT mode with , hence (note on discrete-time modes): , so the CT eigenvalues would be , with the negative real part corresponding to . (Reading: the angle is defined up to , so this is one of the continuous-time systems with those samples.) Typical mistakes: applying the continuous-time condition to (the real part is positive, but in discrete time the test is on the modulus); taking in degrees inside .
b) Closed form. The matrix has the form . An eigenvector for is : (indeed ). The initial state is , a sum of an eigenvector and its conjugate, so
because . Check: for , , which is the first column of , ; for , , and . The norm is (): and . The first time with is (from : ). Typical mistakes: writing for both components (the second one is ); forgetting that is the norm only because the two modes have the same amplitude.
c) The 3x3 system. is block diagonal, so the first two components evolve with (part b) and the third one with the scalar , independent of the others:
The eigenvalues are (modulus ) and (modulus ); all have modulus below , so the system is a.s. The mode of has the larger modulus and therefore decays more slowly: for large it dominates. It is the mode with of the note: its samples alternate in sign, . Times of convergence: the pair satisfies , with and , so from on the norm of the first two components is below (); the third component has , with and , below from (). So is dominated by the real eigenvalue from the beginning on: at the third component is against for the other two together. Typical mistake: judging the speed of convergence from the complex pair because it is the "interesting" one: the slowest mode is the one with the largest modulus.
Exercise 4 (points 6)
A signal passes through a cascade of three first-order stages with unknown rates (in ):
and the measured output is (noise-free, with an impulsive input).
a) Compute the transfer function from to and write the observational parameters of the model class as functions of (2 points).
b) An experiment gives . Find all the values of compatible with it and say whether each parameter and the model class are globally identifiable, locally identifiable or unidentifiable (2 points).
c) Two more sensors can be installed: one on , with measured transfer function , and one on , with measured transfer function . Say what happens when only the sensor on is added, when only the sensor on is added, and when both are added (2 points).
Show the result
a) with , , , and the numerator .
b) , , : the are the roots of in any order, six solutions. Each takes the values : locally identifiable, and so is the model class.
c) Only : and or , two solutions, locally identifiable. Only : or and , two solutions, locally identifiable. Both: , unique, globally identifiable.
Show the full solution
a) Transfer function. In the Laplace domain with zero initial state each stage is , with . In matrix form , , , and is obtained by solving the three equations in cascade (Transfer Matrix of Continuous-Time LTI SystemsThe Laplace transform turns an LTI state-space model into the transfer matrix W(s) equal to H times the inverse of sI minus F times G plus J, which is invariant under a change of state basis, has the modes of the system as poles, and can hide modes through zero-pole cancellations.Transfer Matrix of Continuous-Time LTI Systems →):
Expanding the denominator, with
For an LTI SISO system the observational parameters are the coefficients of the transfer function (A Priori Identifiability of Parametric ModelsA parametric model is identifiable a priori if its parameters can be recovered from observational parameters computed from the noise-free continuous output to an impulse input; for linear time-invariant SISO systems these are the transfer function coefficients, shown on a two-state example.A Priori Identifiability of Parametric Models →): with one has . Here and are the same function of , so there are three independent equations for three unknowns. Typical mistake: counting four observational parameters () when two of them coincide.
b) Solving for . The measured function gives , , (and , consistent). The three numbers have sum , sum of the products in pairs and product : they are the roots of (check: , , ). The equations are symmetric in , so every assignment of the three values is a solution:
Six solutions, a finite number: by the definitions of the note each is locally identifiable (it takes the three values ; not globally, since the solution is not unique, not unidentifiable, since they are not infinite) and the model class is locally identifiable. The meaning: the output does not tell which stage is the fast one, because the product does not depend on the order of the factors. Typical mistake: stopping at and declaring the model globally identifiable.
c) Extra sensors. The three observational sets are now different transfer functions, all computed as in part a).
- Sensor on : ; from , , uniquely. Then and , so in either order: and . The sensor fixes the first stage but not the order of the other two: locally identifiable.
- Sensor on : , which is symmetric in . From : , , so ; the output equation then gives . Solutions and : the order of the first two stages is still unknown: locally identifiable.
- Both sensors: from ; then from , and . Only is compatible with the three measured functions: all the parameters are globally identifiable, so is the model class.
The remedies of the note for an unidentifiable (here only locally identifiable) class are to change the sensors: one extra sensor is not enough, because it leaves a pair of stages that can be exchanged; the first two stages must both be observed. Typical mistake: believing that any additional sensor solves the problem (the sensor on alone leaves the exchange of the first two stages).
Exercise 5 (points 6)
a) Let be the matrix with on the diagonal, on the first superdiagonal and elsewhere. Find the eigenvalues of with their algebraic and geometric multiplicities, the Jordan form, the modes, and say whether is a.s. (1.5 points).
b) The entry of is changed from to , obtaining . Show that the eigenvalues of solve . Compute the eigenvalues for and , find the value of at which the verdict on stability changes, and compare the size of the perturbation with the displacement of the eigenvalues. What does this say about the eigenvalue test of stability (2.5 points)?
c) A student studies with by the function with . Compute , say what the student would conclude and where the argument fails. Then apply the recipe with (2 points).
Show the result
a) Eigenvalue with algebraic multiplicity and geometric multiplicity : a single Jordan block of size ; modes , ; a.s.
b) The characteristic polynomial is . For : , the largest real part is : a.s. For : , the eigenvalue with is : unstable. The verdict changes at (eigenvalue ). A perturbation of moves the eigenvalues by , about times more.
c) , which would suggest stability; but is only positive semidefinite, does not see , and has the eigenvalue . With : , not positive definite, so is not a.s.
Show the full solution
a) The unperturbed matrix. , with the nilpotent matrix with ones on the superdiagonal. The matrix is upper triangular, the eigenvalue is the diagonal entry with algebraic multiplicity . The geometric multiplicity is (the four ones of the superdiagonal give four independent rows). One eigenvalue with geometric multiplicity means one Jordan block, of size : is already in Jordan form (Jordan Canonical FormEvery square matrix is similar to a Jordan matrix of blocks with the eigenvalue on the diagonal and ones above it; generalized eigenvectors built from kernel chains give the change of basis, and the exponential of a Jordan block contains the terms t^k e^(lambda t).Jordan Canonical Form →). A block of size gives the modes , so here with . Since , every mode converges to zero (the exponential dominates the power) and the system is a.s. (Modes and Asymptotic Behaviour of LTI SystemsThe state of an LTI system is a linear combination of modes t^k e^(sigma t) cos(omega t); the real part of the eigenvalues decides whether all modes converge, stay bounded or diverge, illustrated on the pendulum with and without friction and upside down.Modes and Asymptotic Behaviour of LTI Systems →, Equilibrium and Stability of LTI SystemsDefinitions of equilibrium, simple stability and asymptotic stability (local and global), two counterexamples (Van der Pol oscillator, Vinograd system), and the stability conditions for LTI systems in terms of the eigenvalues of F.Equilibrium and Stability of LTI Systems →). Typical mistake: saying that the polynomial factors make the system unstable.
b) The perturbed matrix. Write . Then , with on the diagonal, on the superdiagonal and in the position . Expand the determinant along the first column, which has two entries, in the position and in the position . The minor of the entry is upper triangular with on the diagonal, so it is and the contribution is . The minor of the entry (delete row and column ) is lower triangular with on the diagonal, equal to , and the cofactor sign is , so the contribution is :
This agrees with the note on ill-conditioning (Lyapunov Equation for Continuous-Time Linear SystemsThe Lyapunov approach tests asymptotic stability of a linear system without computing eigenvalues, by solving the matrix equation minus Q equals F transpose P plus P F and checking that the solution P is unique and positive definite.Lyapunov Equation for Continuous-Time Linear Systems →), where the same matrix with zeros on the diagonal has . For the roots are , , so , with and . The largest real part is for : .
- : . The real parts are (), () and (): all negative, a.s.
- : . For , ; for , (); for , (). One real positive eigenvalue: unstable, with mode .
The verdict changes when , i.e. at , where . The size of the perturbation is the change of one entry, , while the eigenvalues have moved from to a distance : a displacement about times larger. Conclusion, as in the note: eigenvalues are ill-conditioned, a tiny change in the matrix (a rounding error, or a parameter known with a small error) can change them a lot, and here it changes the verdict a.s. against unstable; so an eigenvalue test on a matrix that is almost defective (a large Jordan block) must be read with care. This is the motivation of the note for the Lyapunov approach. Typical mistakes: assuming that a perturbation of moves the eigenvalues by about ; expanding the determinant with a wrong sign and finding (which would change the position of the roots).
c) A positive semidefinite . With and the function is and
that is , with positive semidefinite (Lyapunov Equation for Continuous-Time Linear SystemsThe Lyapunov approach tests asymptotic stability of a linear system without computing eigenvalues, by solving the matrix equation minus Q equals F transpose P plus P F and checking that the solution P is unique and positive definite.Lyapunov Equation for Continuous-Time Linear Systems →). The student would conclude that the energy does not increase and that the system is stable. The argument fails because is only positive semidefinite, not positive definite (Positive Definite Matrices and the Sylvester CriterionA symmetric matrix is positive definite when its smallest eigenvalue is positive, and the Sylvester criterion tests this through the signs of the leading minors, which is how energy-like functions x^T P x are checked in Lyapunov arguments.Positive Definite Matrices and the Sylvester Criterion →): , so for every , and does not see the third coordinate, where and diverges with . The system is unstable (eigenvalue ), exactly the situation of the example of the note ("P must be PD").
The correct recipe: choose and solve . For the diagonal and a symmetric the equation for the entry is , with for all the pairs, so is unique and diagonal: , , . Then is unique but not positive definite (the leading minors are , and , so the last one is negative in the Sylvester test), so by the recipe is not a.s., in agreement with the eigenvalue read on the diagonal. Typical mistakes: concluding stability from without checking that is positive definite; reading "not a.s." as "unstable" from the test alone (the test does not say which of the two, here the eigenvalues do).
Self-assessment grid
| Exercise | Topic | Points | How to give them |
|---|---|---|---|
| 1 | Two-stage RC circuit: model, equilibrium, eigenvectors, step response and check on data | 6 | a) circuit laws, state, , , 2; b) equilibrium 0.5, eigenvalues and eigenvectors 1, time constants and a.s. 0.5; c) with the eigenvectors 1, predicted values and differences 0.5, comment on the data 0.5 |
| 2 | Jordan chain, matrix exponential, solution, modes seen from the outputs | 6 | a) multiplicities by the rank 0.5, 0.5, eigenvectors and generalized eigenvector 0.5, and check 0.5; b) 1, 0.5, maximum of and comment 0.5; c) 1, the two outputs and the missing mode 1 |
| 3 | Discrete-time system with complex eigenvalues, sampled modes, convergence times | 6 | a) polynomial, eigenvalues, and 1, a.s. and period 0.5, continuous-time eigenvalues 0.5; b) closed form 1, check 0.5, first time 0.5; c) three components 1, dominant mode and the two times 1 |
| 4 | A priori identifiability of a cascade and choice of sensors | 6 | a) 1, observational parameters 1; b) the six solutions 1, classification 1; c) each of the three cases 0.5, conclusion 0.5 |
| 5 | Ill-conditioning of eigenvalues, positive semidefinite | 6 | a) multiplicities, Jordan form, modes, a.s. 1.5; b) characteristic polynomial 1, two values of 0.5, threshold 0.5, comparison and comment 0.5; c) and failure 1, recipe with 1 |
| Total | 30 |
Give full points for a part only if the formula is written in letters, the units are right and the final value is checked (equilibrium substituted in the equations, , computed both from the closed form and from , the six permutations of the identifiability problem, ). Give half of the points for a correct method with an arithmetic slip. Do not give points for a comment that is not tied to a result of the exercise.