Systems and Models - Mock Exam 1
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. This mock exam is built on the notes of the course only. Official format, from the course description: 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, critical interpretation). The distribution of the points is a proposal of this site: each exercise is worth 6 points, for a total of 30. The data, the systems and the questions are new: it is not a copy of any real test.
Conventions used in the whole test: is the state, the input, the output; "a.s." means asymptotically stable; means positive definite. Every system is described completely in words or by its equations, so that it can be redrawn on the sheet before starting.
How to use it: work with a timer, write every formula in letters before putting the numbers in, and look at the "Result" only when a question is finished.
Exercise 1 (points 6)
A laboratory breeds insects and counts them once a week. The colony is divided into three classes: eggs, larvae, adults (numbers of individuals at week ). In one week the following happens:
- each adult lays eggs, and the technician adds eggs from an external stock; all these eggs are the eggs of the next week;
- percent of the eggs of the week become larvae the next week (the other eggs are lost);
- percent of the larvae become adults the next week (the other larvae are lost), and percent of the adults survive to the next week (the other adults die).
The measured output is the number of adults, .
a) Write the discrete-time state-space model , . For and for all , compute and (2 points).
b) Compute the characteristic polynomial and the eigenvalues of , say which modes appear and whether the free evolution is a.s., stable or unstable. For and find the limit of for (2.5 points).
c) The technician now adds a constant number of eggs every week. Does the system have an equilibrium? What happens to the colony in the long run? Comment on the result, given the answer of part b (1.5 points).
Show the result
a) , , ; , .
b) ; eigenvalues and (modulus ). Modes and -type: bounded, so the system is stable but not a.s. The limit is .
c) No equilibrium exists. The weighted count obeys , so the colony grows without bound, asymptotically by about individuals per week (the adults grow by about per week), even though the free evolution is stable.
Show the full solution
a) Model. Each equation gives the value of one class next week (see the lab cell population in 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 →, where the same kind of diagram of arrows is used). Eggs: the adults give and the technician . Larvae: . Adults: from the larvae plus survivors:
that is
For and :
Typical mistake: putting the survival rate of the adults in but forgetting that the larvae pass to the adult class (the entry ), or writing the eggs laid in the equation of the larvae.
b) Eigenvalues, modes, limit. Expanding along the first row:
is a root (), and dividing by gives , whose roots are with modulus . The three eigenvalues are distinct, so is diagonalizable and every mode has (no factor ): the modes are and (with ) and (see 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 →). The complex pair has and converges to zero, the mode is bounded but does not converge: by the criterion of 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 → the system is stable but not a.s. Typical mistake: declaring it unstable because one eigenvalue is equal to one, or a.s. because the others have modulus below one.
Limit. Only the mode of survives, so with the eigenvector of . From : the first row gives , the second ; taking gives , and the third row is then satisfied (). The coefficient comes from the diagonalization (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 →, Solution of Discrete-Time LTI SystemsA discrete-time LTI system is solved by iterating the difference equation, which gives a free evolution F to the power t times the initial state plus a convolution with F to the power t minus one times G, and the matrix power is computed through the diagonal or Jordan form with binomial coefficients.Solution of Discrete-Time LTI Systems →): , and the row of that multiplies the mode is a left eigenvector , . Solving : , , , which gives (check: ). Since annihilates the other eigenvectors, the component of along is :
The colony settles at about eggs, larvae and adults, in the proportions of the eigenvector, whatever the way it gets there.
c) Constant input. An equilibrium with must satisfy . The matrix is not invertible (it has the eigenvalue ), so, by 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 →, there are either infinitely many solutions or none. Multiply the equation on the left by : , so the left-hand side is , while the right-hand side is . Hence no equilibrium exists.
What happens instead: the scalar satisfies , so with
a linear growth. The components along the stable modes converge, so asymptotically : the colony grows without bound, by about individuals per week, in the fixed proportions (for instance after weeks the adults are about ). Comment: "stable" in the sense of part b only says that the free evolution stays bounded; an input that is constant, and constantly excites a mode with eigenvalue one, makes the state diverge linearly (the mode is "resonant" with the input). To keep the colony bounded the technician would have to stop the eggs or remove individuals. Typical mistake: solving with a pseudo-inverse and announcing an equilibrium that does not exist.
Exercise 2 (points 6)
Consider the continuous-time system , (so ) with
a) Compute the matrix exponential , the impulse response and the transfer function (2 points).
b) The initial state is and the input is the unit step, for . Compute the free response and the forced response of the output, the output and its limit for (2 points).
c) For the same initial state and input compute the state . Compare the behaviour of the output with that of the state, say whether the system is stable and explain what the transfer function does and does not show (2 points).
Show the result
a) ; for ; .
b) Free response , forced response ; .
c) , : the state diverges although the output converges. The eigenvalues are and : the system is unstable; the mode cancels in and in the output.
Show the full solution
a) Exponential, impulse response, transfer function. is upper triangular with the distinct eigenvalues and . Use the Laplace transform, (Solution of LTI Systems and the Matrix ExponentialThe autonomous LTI system x' = Fx with x(0) = x0 has solution x(t) = exp(Ft) x0, where the matrix exponential is a power series; it is computed with diagonalization or with the Laplace transform, shown on a worked 2 by 2 example.Solution of LTI Systems and the Matrix Exponential →). The determinant of is and, inverting the matrix,
The partial fractions of the corner entry are (check: ). Transforming back,
The impulse response of the course is (Forced Response and Impulse Response of LTI SystemsThe state of a non-autonomous LTI system is the sum of a free evolution driven by the initial state and a forced evolution given by the convolution of the input with the matrix exponential, and the output response to a Dirac delta input is the impulse response.Forced Response and Impulse Response of LTI Systems →). Here is the second column of , and
The terms cancel. The same result from the transfer matrix (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 →): , a zero-pole cancellation, and . Typical mistake: forgetting that the second column of (not the second row) multiplies .
b) Output for a step input. The output is the sum of the free and the forced response, .
Free response. , hence .
Forced response. With the convolution is .
Check: . Typical mistake: dropping the free response, which is not zero because .
c) State and interpretation. The second equation is decoupled: with . With the formula of the forced evolution, . Then , :
Check: , as in part b. The two state components grow like and diverge, while the output converges to : the divergent parts cancel exactly in .
The system is unstable: the eigenvalues of are and and (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 mode is present in the state, but it does not appear in , in nor in the free response of the output: this is the zero-pole cancellation of the transfer matrix. Reading the stability from alone (a single pole at ) would give the wrong answer. describes the input-output behaviour of what is seen from , not all the modes of the state. Typical mistake: declaring the system a.s. because converges.
Exercise 3 (points 6)
A drug is injected into compartment 1 and passes to compartment 2, from which it is eliminated. With the unknown parameters the model class is
where is the injection rate, and the amounts in the compartments and only is measured.
a) Compute the transfer function from to and write the observational parameters of the model class as functions of (2 points).
b) An experiment with an impulsive input and noise-free measurements gives the transfer function . Find all the values of that are compatible with it and say whether each parameter and the model class are globally identifiable, locally identifiable or unidentifiable (2 points).
c) The model is extended with an unknown sensor gain, . Show that the class is then unidentifiable. Then a second sensor is added: with the transfer functions (from to ) and (from to ), find (2 points).
Show the result
a) ; observational parameters , , .
b) gives exactly two solutions, and : every parameter is locally identifiable, not globally; the model class is locally identifiable.
c) With only the product is known: infinitely many solutions, unidentifiable. With too: , , , , the unique solution: globally identifiable.
Show the full solution
a) Transfer function. In matrix form (see 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 →):
The determinant is and, inverting a matrix (swap the diagonal, change the sign of the off-diagonal entries),
For an LTI SISO system the observational parameters are always 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 a unit impulse , so and the coefficients can be computed from the output. Here the numerator is a constant, and
b) Solving for . Compare with the form found in a): , , . From the first, ; in the second, , that is , whose roots are and . Then or and, from the third equation, or :
Check of the second solution: , , , the same . The system of equations has a finite number of solutions (two) for each , so by the definitions of the note each parameter is locally identifiable (not globally, since the solution is not unique, and not unidentifiable, since the solutions are not infinite), and so is the model class. The meaning: with the output only, the two rate constants can be exchanged, and the input gain compensates, without changing the input-output behaviour. Typical mistake: stopping at the first solution found and declaring the model globally identifiable.
c) Extended model. With one has and the transfer function becomes times the previous one:
The three equations now involve four unknowns. For every choice of among the two roots, is fixed and any can be taken, with : infinitely many solutions, only the product is computable, so and are unidentifiable and the model class is unidentifiable. Remedies of the note: change the model class or change the sensors.
Add : now and, using the first row of computed in a),
The observational parameters of are the pole and the gain, so from one reads and , uniquely. Then from : gives (check: , as ), and gives . All four parameters have a unique solution: the extended class with two sensors is globally identifiable. Typical mistake: counting equations and unknowns without checking that the equations are independent (here only the product appears).
Exercise 4 (points 6)
An unknown function is observed through noisy samples . Consider the two parametric classes
a) Only two samples are available, and . Show that without any model class the reconstruction of is an ill-posed problem. Then find all the functions of and all the functions of that pass through both samples, and say in which class the problem becomes well posed (2 points).
b) A third sample arrives. Find the functions of that pass through the three samples. Can a function of pass through all of them? Compare the number of parameters with the number of samples (2 points).
c) A fourth sample is taken at the same point as one already available, . Can any function , in any class, pass through all the four samples? What does this say about the term and about what we ask of ? (2 points)
Show the result
a) Without a class: , and an arbitrary value elsewhere (infinitely many choices). : exactly one function, . : infinitely many, with free. The problem is well posed in (2 parameters, 2 samples).
b) : exactly one function, (3 parameters, 3 samples). : none (the line through the first two samples gives at , not ).
c) No function can pass through and : a function has one value at . The difference must be attributed to the disturbance ; interpolating all the data is impossible and not even desirable, the goal is a that approximates the samples and generalises to points not in the data.
Show the full solution
a) Ill-posedness and the two classes. The note on the estimation problem (System Identification - Estimation Problem and Parametric Model ClassesEstimation means reconstructing an unknown function from noisy samples; the problem is ill posed, so one fixes a parametric model class, and the basic objects (statistic, estimator, estimate) are defined, with the gray-box and black-box versions for dynamical systems.System Identification - Estimation Problem and Parametric Model Classes →) gives the example of the two samples and : any with and is acceptable and its value at every other point is arbitrary. Here too: , , and e.g. or are equally compatible with the data. There are "too many" choices: the problem is ill posed.
Class . The conditions and give and , so : one function, (two equations in two unknowns).
Class . The same conditions give and , i.e. with free (two equations, three unknowns):
For example can take any value. Choosing a class makes the problem finite-dimensional, but a class that is too large (more parameters than samples) leaves it ill posed. The problem is well posed in . Typical mistake: saying that a bigger class is always better, since it contains more candidates.
b) Three samples. With the conditions in are
From the second, ; from the third, , i.e. . Subtracting: , then . The unique function is (check: and ). Three equations, three unknowns, a unique solution: the number of parameters equals the number of samples.
In the first two samples already fix , which at gives : no function of passes through the three samples (three equations in two unknowns, inconsistent). With more samples than parameters one must give up the exact interpolation and choose a criterion for the "closest" function, which is what least squares does (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 →). Typical mistake: forcing through all points by changing the data.
c) Repeated sample. The samples and have the same and different . A function has only one value , so no can pass through both, whatever the class (even a class with infinitely many parameters). This is exactly the role of the term in : the two measurements of the same differ by the disturbance, and at least one of the two errors is non zero (the difference is ). Consequence: asking the model to reproduce the samples exactly would make it reproduce the noise as well. The goal of the estimation, as the note says, is a that generalises, i.e. also at points that are not among the samples, and not a with zero error on the data. Typical mistake: deleting one of the two measurements to restore the interpolation.
Exercise 5 (points 6)
The three pictures of the course for the stability of the equilibrium of a second-order LTI system are a closed orbit around the origin, a spiral towards the origin and a hyperbolic-type curve that moves away along the axis. Consider the systems with
a) Compute the eigenvalues of , , and match each one with one of the three pictures. For each say whether the origin is stable, asymptotically stable or unstable. For show that is constant along the trajectories and use it to find, for every , a that satisfies the definition of stability (2.5 points).
b) For and find all the equilibria and compute . Say for each whether its equilibria are stable, asymptotically stable or unstable, using the definitions with and (2 points).
c) Say whether each statement is true or false, with a one-line justification taken from the examples above: (i) "if all the trajectories of an LTI system are bounded, its origin is asymptotically stable"; (ii) " for all the eigenvalues is enough for stability"; (iii) "an asymptotically stable LTI system can have an equilibrium different from the origin" (1.5 points).
Show the result
a) : , closed orbits (ellipses constant), stable, not a.s.; works. : , spirals towards the origin, a.s. : , hyperbolic-type curves, unstable.
b) : equilibria for every (the kernel of ), : all stable (), none a.s. : equilibria , : all unstable.
c) (i) False: and have bounded trajectories and are not a.s. (ii) False: has twice and is unstable ( but ). (iii) False: if the system is a.s. the origin is the only equilibrium.
Show the full solution
a) The three pictures. For : , , purely imaginary: the first picture (closed orbit). For : , , complex with negative real part: the spiral towards the origin. For : diagonal, and (opposite signs), and constant: the hyperbolic-type curves of the third picture (see Trajectories of Second-Order LTI SystemsThe shape of the trajectories of a second-order LTI system in the plane depends on its eigenvalues: hyperbolic, parabolic, elliptical or spiral curves; rectilinear trajectories occur when the initial state is an eigenvector.Trajectories of Second-Order LTI Systems →).
Stability, with 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 →: has for both eigenvalues, so the origin is asymptotically stable. has : is not bounded and the origin is unstable. has with two distinct eigenvalues ( for each): is bounded, the origin is stable, but not a.s. since the orbits are closed and does not tend to .
The definition for : along the trajectories , so and each trajectory runs on an ellipse. Since ,
Given take : if then for every (the bound is the ratio between the long and the short semi-axis of the ellipses, ). The condition on attractiveness fails: constant and non zero prevents for . Typical mistake: calling asymptotically stable because the orbits are bounded.
b) Equilibria with a nontrivial kernel. For an LTI system the equilibria are the points of (they are all the points with ). Both and have , the axis: infinitely many equilibria.
. . Take the equilibrium : and , so works: every equilibrium is stable. None is a.s.: from a state with the trajectory converges to , a different equilibrium, and not to . So convergence does not mean asymptotic stability of a given equilibrium.
. (course example), so . Take and the initial state , which is as close as we want to for a small . Then , which exceeds any for : whatever , the trajectory leaves the -ball, so the definition of stability fails and every equilibrium is unstable. The trajectories are horizontal lines: a straight line does not mean a stable one. Typical mistake: calling stable because its trajectories are straight lines and its eigenvalue is .
c) True or false.
(i) False. (closed orbits) and (trajectories that stop on the axis) have all the trajectories bounded and the origin is not a.s. (the condition is needed for a.s.).
(ii) False. gives a bounded only if (algebraic multiplicity equal to the geometric one, purely oscillatory modes). has with and (the kernel has dimension one), so contains the term and the system is unstable.
(iii) False. If the system is a.s., all eigenvalues have , so is not an eigenvalue, and the origin is the only equilibrium; in an LTI system all the equilibria have the same behaviour. (For nonlinear systems each equilibrium can have its own behaviour.)
Self-assessment grid
| Exercise | Points | What must be in the answer for full marks | Typical mistakes |
|---|---|---|---|
| Exercise 1 | 6 | , , read correctly from the description, and (2); , eigenvalues and , stable not a.s., eigenvector , left eigenvector , limit (2.5); no equilibrium because and , linear growth of , comment on stable versus bounded (1.5) | Entry missing or eggs and larvae mixed; eigenvalue one read as instability; limit computed without the left eigenvector; announcing an equilibrium although is singular |
| Exercise 2 | 6 | with the entry , (second column of times ), (2); free response , forced response , (2); and , diverging state, unstable system, mode cancelled in and in (2) | Row instead of column of ; free response forgotten; stability read from or from the convergence of ; error in the integral for |
| Exercise 3 | 6 | and the three observational parameters (2); two solutions and , locally identifiable (2); only the product , unidentifiable; with the unique solution (2) | Only one root taken; equations counted but not independent; cancellation not performed in ; confusing local and global identifiability |
| Exercise 4 | 6 | Ill-posedness without a class; unique , with the free (2); unique with three samples, inconsistent, parameters against samples (2); two values at the same : no function interpolates, role of , aim of generalising (2) | Bigger class judged always better; forced through three points; deleting a measurement to restore the interpolation; confusing "zero error on the data" with a good estimate |
| Exercise 5 | 6 | Eigenvalues , , and matched with the three pictures and with stable, a.s., unstable; constant on and (2.5); and : lines of equilibria, computed, stable not a.s., unstable with the - argument (2); three statements false with the counterexamples , , and the uniqueness of the origin (1.5) | Bounded orbits taken as a.s.; called stable because its eigenvalue is zero; convergence to another equilibrium taken as asymptotic stability; chosen larger than without checking the bound |