Salta al contenuto
Note per Studenti System Modeling Report

System Modeling

In questa pagina 10

To design a controller we need a mathematical description of how the physical system reacts. This note collects the lesson on system modeling: what a model is, its ingredients, the notions of input, output and state, the classification of models (static/dynamic, causal, linear, time-invariant, SISO/MIMO) and the standard input-output ODE that the rest of the course uses. (The lesson does not develop block-diagram algebra, which is therefore not covered here.) Follow-up: Time-Domain Solution of ODEsA linear constant-coefficient ODE is solved as the sum of a homogeneous solution (natural modes from the characteristic equation) and a particular solution (forced by the input), with the constants fixed by the initial conditions; the sign of the real part of the roots decides growth or decay.Time-Domain Solution of ODEs →; context in Introduction to Control SystemsA control system makes a physical system follow a desired reference; the key idea is feedback (closed loop), compared with open-loop control, and the problem is formulated in terms of systems, control inputs, disturbances, outputs and a reference.Introduction to Control Systems →.

1. Why we need models

A control system acts on a physical system. To design the controller we need a mathematical description of how the system reacts:

  input u(t) ------> [ system / model ] ------> output y(t)

A model connects causes (inputs), internal evolution and measured effects (outputs).

2. What is a mathematical model?

Definition. A mathematical model is an abstract description of the structure and behavior of a system using mathematical symbols and relations. It gives a quantitative description of the system.

Remark from the lesson: in many control courses, after the model has been derived, the word system is often used to mean the mathematical model itself.

The three ingredients

Ingredient Meaning Examples
Parameters constants describing the structure m,k,R,C,…m, k, R, C, \dots
Variables quantities that evolve x(t),v(t),i(t),…x(t), v(t), i(t), \dots
Relations equations connecting the variables

parameters+variables+relations  ⇒  model\text{parameters} + \text{variables} + \text{relations} \;\Rightarrow\; \text{model}

3. Input, output and state

  • Input u(t)u(t): the cause acting on the system.
  • Output y(t)y(t): the effect that we measure or care about.
  • State x(t)x(t): the information needed to continue the evolution.
   u(t) -------> [ dynamic system ] -------> y(t)
                        ^
                        |  (dashed)
                       x(t)

Example state variables: position and velocity (mechanical system); capacitor voltage and inductor current (electrical circuit).

4. Static or dynamic?

Static model Dynamic model
the output depends only on the input at the same time the output depends on the present and past evolution
y(t)=f(u(t))y(t) = f(u(t)) x˙(t)=f(x(t),u(t))\dot{x}(t) = f(x(t), u(t))
no memory; algebraic relation memory; differential equation

Control systems are mainly interested in dynamic models, because control means shaping how the system evolves in time.

Example: static model of a scale

A mass mm rests on a spring of stiffness kk; a weight PP is applied and yy is the compression (measured downward). Only the final compression is considered (equilibrium):

Fe=k y,Fe=P⟹y=1k P.F_e = k\,y, \qquad F_e = P \quad\Longrightarrow\quad y = \frac{1}{k}\,P.

This is an algebraic input-output relation: the output at time tt depends only on the input at the same time.

Example: dynamic model of a scale

Now we care about the motion in time, not only the equilibrium. A damper bb is added in parallel to the spring kk. Input: P(t)P(t), output: y(t)y(t). By Newton's second law:

my¨(t)=P(t)−Fe(t)−Fv(t),Fe(t)=k y(t),Fv(t)=b y˙(t),m\ddot{y}(t) = P(t) - F_e(t) - F_v(t), \qquad F_e(t) = k\,y(t), \quad F_v(t) = b\,\dot{y}(t),

hence

my¨(t)+by˙(t)+k y(t)=P(t).\boxed{m\ddot{y}(t) + b\dot{y}(t) + k\,y(t) = P(t).}

Terms:

  • my¨m\ddot{y}: inertia;
  • by˙b\dot{y}: damping (viscous) force;
  • k yk\,y: elastic force.

This is a dynamic model: the output depends on derivatives of y(t)y(t), so the system has memory.

5. Input-output model vs state model

Input-output Input-state-output
relates input and output directly introduces variables that summarize the past
my¨+by˙+ky=Pm\ddot{y} + b\dot{y} + ky = P x1=y,  x2=y˙x_1 = y,\; x_2 = \dot{y}
useful before introducing solution methods for ODEs x˙1=x2,x˙2=1m(P−bx2−kx1)\dot{x}_1 = x_2,\quad \dot{x}_2 = \dfrac{1}{m}\left(P - b x_2 - k x_1\right)
useful for modern control and simulation

How the second column follows from the first: choose position and velocity as state variables, x1=yx_1 = y and x2=y˙x_2 = \dot{y}. Then x˙1=y˙=x2\dot{x}_1 = \dot{y} = x_2, and solving the dynamic equation for y¨\ddot{y} gives y¨=1m(P−by˙−ky)\ddot{y} = \dfrac{1}{m}(P - b\dot{y} - k y), i.e. x˙2=1m(P−bx2−kx1)\dot{x}_2 = \dfrac{1}{m}(P - b x_2 - k x_1).

For this introductory part of the course, input-output models are mainly used.

6. Signals: time and value

A signal can be continuous or discrete in time, and continuous or discrete in value:

continuous time (tt) discrete time (kk)
continuous value analog sampled
discrete value quantized digital

In this course we mainly study continuous-time, continuous-valued signals.

7. A compact map of model properties

A model can be classified with a few questions:

  • continuous time or discrete time?
  • SISO or MIMO?
  • static or dynamic?
  • causal or noncausal?
  • linear or nonlinear?
  • time-invariant or time-varying?

In this course the most important class is: SISO, continuous-time, causal, dynamic, linear, time-invariant systems.

7.1 Causality

Causal model: the output at time tt depends only on inputs up to time tt, not on future inputs.

  • Causal example: y(t)=∫0tu(τ) dτy(t) = \displaystyle\int_0^t u(\tau)\,d\tau (uses present and past input).
  • Noncausal example: y(t)=u(t+T)y(t) = u(t + T) (requires the future input).

Physical real-time systems must be causal.

7.2 Linearity (superposition principle)

A system is linear if scaling and adding causes produces scaling and adding effects. If

u1(t)→y1(t),u2(t)→y2(t),u_1(t) \to y_1(t), \qquad u_2(t) \to y_2(t),

then a linear system satisfies

αu1(t)+βu2(t)  →  αy1(t)+βy2(t).\alpha u_1(t) + \beta u_2(t) \;\to\; \alpha y_1(t) + \beta y_2(t).

Examples from the lesson: linear spring F=kxF = kx; nonlinear spring F=k1x+k3x3F = k_1 x + k_3 x^3. (Linearization of nonlinear models is treated in LinearizationLinearization replaces a nonlinear model by its first-order Taylor expansion around an equilibrium, written in deviation variables, so that transfer functions, poles and stability can be used locally.Linearization →.)

7.3 Time invariance

A time-invariant system behaves the same way today and tomorrow. If the input is delayed by TT, the output is the same, delayed by TT:

u(t)→y(t)⇒u(t−T)→y(t−T).u(t) \to y(t) \quad\Rightarrow\quad u(t - T) \to y(t - T).

If parameters change with time, for instance k(t)k(t), the model is generally time-varying.

8. What we mainly study: LTI systems

Linear Time-Invariant (LTI) systems, which are:

  • SISO: single input, single output;
  • in continuous time;
  • causal and dynamic.

This restriction is not a weakness: it gives a powerful and clean starting point for control design.

9. The standard input-output ODE

For SISO continuous-time LTI systems the input-output model is often written as

∑n=0Nandny(t)dtn=∑m=0Mbmdmu(t)dtm.\sum_{n=0}^{N} a_n \frac{d^n y(t)}{dt^n} = \sum_{m=0}^{M} b_m \frac{d^m u(t)}{dt^m}.

  • an,bma_n, b_m: constant parameters of the model;
  • NN: order of the model;
  • u(t)u(t): input signal;
  • y(t)y(t): output signal;
  • usually M≤NM \le N for causal systems.

The mass-spring-damper of Section 4 is the case N=2N = 2, M=0M = 0: a2=ma_2 = m, a1=ba_1 = b, a0=ka_0 = k, b0=1b_0 = 1, with u=Pu = P.

10. Take-away

 physical system --> model --> ODE --> solution

The next step is to solve these ODEs in the time domain, using tools from calculus: see Time-Domain Solution of ODEsA linear constant-coefficient ODE is solved as the sum of a homogeneous solution (natural modes from the characteristic equation) and a particular solution (forced by the input), with the constants fixed by the initial conditions; the sign of the real part of the roots decides growth or decay.Time-Domain Solution of ODEs →.

Versione ripasso

Mathematical model: abstract, quantitative description of a system. Ingredients: parameters (constants m,k,R,Cm, k, R, C), variables (x(t),v(t),i(t)x(t), v(t), i(t)), relations (equations).

Input u(t)u(t) = cause; output y(t)y(t) = measured effect; state x(t)x(t) = information needed to continue the evolution (position and velocity; capacitor voltage and inductor current).

Static vs dynamic: static y(t)=f(u(t))y(t) = f(u(t)) (algebraic, no memory); dynamic x˙=f(x,u)\dot{x} = f(x, u) (differential equation, memory). Control is mainly about dynamic models.

Scale examples:

  • static: Fe=ky=P⇒y=P/kF_e = ky = P \Rightarrow y = P/k;
  • dynamic: my¨+by˙+ky=P(t)m\ddot{y} + b\dot{y} + ky = P(t) (inertia, damping, elastic force).

State form (x1=yx_1 = y, x2=y˙x_2 = \dot{y}): x˙1=x2\dot{x}_1 = x_2, x˙2=1m(P−bx2−kx1)\dot{x}_2 = \frac{1}{m}(P - bx_2 - kx_1). The course mainly uses input-output models.

Signals: continuous/discrete time ×\times continuous/discrete value gives analog, sampled, quantized, digital. The course studies continuous-time, continuous-valued signals.

Classification questions: continuous/discrete time; SISO/MIMO; static/dynamic; causal/noncausal; linear/nonlinear; time-invariant/time-varying.

  • Causal: y(t)y(t) depends only on u(τ)u(\tau), τ≤t\tau \le t (e.g. y=∫0tu dτy = \int_0^t u\,d\tau; y=u(t+T)y = u(t+T) is noncausal).
  • Linear: αu1+βu2→αy1+βy2\alpha u_1 + \beta u_2 \to \alpha y_1 + \beta y_2 (spring F=kxF = kx linear, F=k1x+k3x3F = k_1 x + k_3 x^3 nonlinear).
  • Time-invariant: u(t)→y(t)⇒u(t−T)→y(t−T)u(t) \to y(t) \Rightarrow u(t-T) \to y(t-T).

Course focus: SISO, continuous-time, causal, dynamic LTI systems.

Standard ODE: ∑n=0Nandnydtn=∑m=0Mbmdmudtm\sum_{n=0}^{N} a_n \frac{d^n y}{dt^n} = \sum_{m=0}^{M} b_m \frac{d^m u}{dt^m}, NN = order, M≤NM \le N for causal systems.

Typical mistakes: calling a system linear because the equation "looks simple" (the superposition test must hold); confusing a time-varying parameter k(t)k(t) with a time-invariant one; forgetting that M≤NM \le N is the usual condition for causal systems.

Next: Time-Domain Solution of ODEsA linear constant-coefficient ODE is solved as the sum of a homogeneous solution (natural modes from the characteristic equation) and a particular solution (forced by the input), with the constants fixed by the initial conditions; the sign of the real part of the roots decides growth or decay.Time-Domain Solution of ODEs →.

Teoria collegata