Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Summary

This document appears to be a chapter 1 from an academic textbook about nonlinear control engineering. It introduces concepts like stability theory, differential geometry, and nonlinear mathematical models.

Full Transcript

> - Excursion to Bast ? Jan 1 Feb X+ -x3 +...

> - Excursion to Bast ? Jan 1 Feb X+ -x3 + X moliheanized > - Exact linearization + eg. X = U -def. u = 0 => = v Stabilization of Stability theory systems > - - > > - solutions willnotbea Chap 2 basics ; differential volunteer geometry > -. -> math ; notation > - approach prof > ↳ need to no learn understand the 15 min by heart , concerts > Organisational excercises prepared by I presented you lus ) - > - : , solved. Important do computer ! excercises independently ! > - - Chapter 1 > - e (Computer Algebra System ( Mathematica -> next week intro to Mathematica > Oral in - uxams the Lecture free period Introduction 1.1 Problem setup Technical processes and equipment are exposed to external influences that may interfere with the desired process or system behavior. Examples include load changes in electric drives or generators, failures of compo- nents in electrical transmission networks, wind or weather influences on vehicles or airplanes, driving dynamic borderline situations, variability in raw materials for production, temperature variations in chemical reactors, or supply changes in distillation columns. The objective of automatic control (control theory and control systems engineering) is to manipulate a process evolving over time so that it runs or performs in a desired manner. For this it is necessary to measure certain process variables to be able to quantify the difference between the desired and the actual behavior. This difference is supplied to the system in a suitable manner via externally manipulable variables resulting in a feedback loop or control loop, respectively. The resulting scheme is shown in Figure 1.1. Often additional conditions are specified in the form of optimality criteria, e.g., attaining of a predetermined process dynamics while minimizing supplied energy and used resources or within a minimum time interval. 2X. i example : PID controller linear control Disturbance Measurement error park a car - you > > not necessarily lin - a System E. vision , (p) ↑ hearing Reference u = - kp(u -r) Feedforward Measurements * Actuators System Sensors kIJ (y(t) ( + ))di (i) - - r - Kp(u v) - (DI Process ex large scale Clock : Airplanes Track the. ex Military planes ° ↓ built unstable for performance D/A Computer A/D Filter Reference > - piloting only w/ controllers Controller > you - Figure 1.1: Schematic representation of the components of a control loop for a given process. The upper dashed marked area represents the process dynamics consisting of the actuators, the actual system (plant) and the sensors. In addition, disturbances may act on the system and the sensors may be subject to measurement errors, e.g., in the form of measurement noise. The controller, which processes the difference between measured and reference value, is summarized in the lower dashed part and is composed of filters, analog/digital (A/D) and digital/analog (D/A) converters as well as the computerized implementation of the control algorithm. The system clock is used to synchronize the components. In addition, the transient behavior can be influenced by properly designed feedforward control signals. In addition to the various engineering tasks control engineering and related problems can be found in the I natural sciences, medical science or non–technical domains. Examples include economic processes and 1 State space concept : 1 = AX + Bu * vector X solutions a 1 = C + Du Ilinear Scalar / numerical b system ) A,B IRY , matrices * (0)... : Nominear = XoE famulation it linearization associates input state variableas Mechanical oscillation systems, regulation and monitoring of traffic flows, social networks, biological processes and their technical use * or the applications of plasma physics in tokamak (fusion) reactors or quantum physics in quantum computers. weseeaenceform ? It should be noted that the methods of linear control theory and control systems engineering are probably the u m sometimes w 2nd derivative ( ms = -d5 - C+ F , + >0 > - initial State > - velocity 2nd order & position > - 2 init. cond. most advanced, which is due in particular to the validity of the superposition principle that greatly simplifies the varians) treatment of this system class (meurer:rtsys). However, if the arising nonlinearities can no longer be neglected, then analysis and design have to be based on methods of nonlinear systems and control theory. :-X diff A & i u) => = x - Em x2 + makethisproblemnonlineaa > - 1.2 Nonlinear mathematical models and nonlinear phenomena method doesn't change > - state Vector can also be chosen differently : eg.: x= [ SIS]iX(0) = [St] ↑ [1JT State vcan be = h other choice of state vector is not unique 1 = [S ]. vasiest Choice Subsequently, certain fundamental concepts are summarized that are relevant of the later introduced analysis and design steps. Consider the system shown schematically in Figure 1.2. If the values of the output variables > eq can be time -. also dep. for ex ifdampener deterioratea Block diagram I Input variables Output variables u1 y1 2 approaches : State variables u2 Xi y2 > - black box > math. model -... System... T this is what we'll do um yp Figure 1.2: Input and output variables of a system. y 1 (t ),... , y p (t ) at time t depend only on the course of the input variables u 1 (ø),... , u m (ø) for times ø ∑ t , then the system is called causal. Since any technically realizable system is causal this property is presumed. Definition 1.1: State, state variable Given a dynamical system. If there exist quantities x 1 ,... , x n with the property that the output variables y 1 ,... , y p at an arbitrary instance of time t are uniquely determined by the course of the input variables u 1 (ø),... u m (ø) on the interval t 0 ∑ ø ∑ t and the values x 1 (t 0 ),... , x n (t 0 ), then x 1 ,... , x n are called the states or state variables, respectively, of the system. One distinguishes between dynamical systems with finite state (of order n) or so–called concentrated parame- ter systems that can be described by a finite number of n states and those with an infinite state or so–called distributed parameter systems. The first class is mathematically described by ordinary differential equations possibly in connection with algebraic equations. The second class is given by delay differential or partial differential equations. In the following only systems with finite state are considered that allow for a formulation in term of n state differential equations with corresponding initial conditions d x 1 = f 1 (x 1 ,... , x n , u 1 ,... , u m , t ), t > t 0, x 1 (t 0 ) = x 1,0 dt d x 2 = f 2 (x 1 ,... , x n , u 1 ,... , u m , t ), t > t 0, x 2 (t 0 ) = x 2,0 dt... d x n = f n (x 1 ,... , x n , u 1 ,... , u m , t ), t > t 0, x n (t 0 ) = x n,0 dt and p output equations y 1 = h 1 (x 1 ,... , x n , u 1 ,... , u m , t ), t ∏ t0 y 2 = h 2 (x 1 ,... , x n , u 1 ,... , u m , t ), t ∏ t0... y p = h p (x 1 ,... , x n , u 1 ,... , u m , t ), t ∏ t 0. 2 Chapter 1 Introduction By introducing the column vectors 2 3 2 3 2 3 x1 u1 y1 6x 7 6u 7 6y 7 6 27 6 27 6 27 x =6 7 6 7 6 7 6.. 7 , u = 6.. 7 , y = 6.. 7 4. 5 4. 5 4. 5 xn um yp d and the notation that dt can be represented by a dot over the to be differentiated quantity the equations can be put into a compact form ẋ = f (x, u, t ), t > t 0, x(t 0 ) = x 0 (1.1a) y = h(x, u, t ), t ∏ t 0. (1.1b) The quantities x, u und y are simply called state, input and output of the dynamical system. If the state x is considered as element of an n–dimensional vector space, then this vector space is called the state space. The state of a system at time t can be visualized as a point in the n–dimensional state space. The curve connecting all these points in state space as time t evolves in a certain interval is called trajectory, see Figure 1.3. x3 linear 1 Ax : = + B1 > Solution - x0 Y = CX + Du X(0) = Xo trajectory nonlinear 1 : = f(x , 2) of a x(t) 1 - G(X , 1) system = : x3 (t) Ipsolution solution or x2 case by case path x1 (t) x2 (t) x1 Figure 1.3: Illustration of a trajectory in state space R3. The fundamental difficulty in the analysis of nonlinear systems is given by the loss of the superposition principle, which is only valid for linear systems. As is shown, e.g., in meurer_rt1 the linearization of a nonlinear system at an equilibrium or operating point, respectively, provides a first approach for analysis and design. The validity of this ansatz is, however, restricted to a certain neighborhood of the equilibrium or operating point so that — if at all — only the analysis of the local system behavior is possible. In addition, nonlinear systems in general cover a rich class of dynamical properties that have no equivalent in linear systems. This in particular covers the examples discussed in the following (Khalil, 2002). Non–uniqueness of solutions: A linear dynamical system has a unique solution. This is not guaranteed for nonlinear systems. X x 3 + > 0 x(0) 0 Xo ~ = = , , = um f(x) -- continuous function solution : (1) x (t) = 0 (ii) X"3 = = (t) (Et)3-two > - x = solutions ↳ f continuous > Continuity is - not the issue ↳ address this by Lipschitz continuity ↓ f(x) must be continuously differentiable because in tech. Systems we can't have I solutions 1.2 Nonlinear mathematical models and nonlinear phenomena 3 Finite escape time: An unstable linear system approaches infinity only for t ! 1. Nonlinear systems may show this behavior also in finite time. = consider x o , x(d =So /t solve > separation of variables - : ) solution x(t) = = : t denominator dep. Xo & t what if (1 -x +* ) 10 : = 0 = +x = => solution holds true if Opt Finite escape time * t = if Xo > > - there also the of finite is case settling time => "What happens when the solution " ? goes to infinity. Multiple steady states (equilibria): Nonlinear systems can have multiple, isolated steady states. Equilibrium * = f(x) ; +)0 ; x(0) = x0ERh I no inputs 1 => = 0 equilibrium steady state , Ino rate , stationary state of changes * a x & * (t) = Xe q = f(zd -xz ↑ X3 Examples : x = (x a)(x + b)(x - - c) = f(x) => f(x) = 0 => Xx, a ultiple equilibria = 1 Xx , z depends o n b stability starting = - , point,... XX , 3 = C 4 Chapter 1 Introduction Limit cycles: Limit cycles or permanent oscillations can be found commonly, e.g., in biological systems. A linear system shows oscillatory behavior only, if the eigenvalues ∏ of the system matrix A are located on the imaginary axis in the complex plane, i.e., if 0. (1.2) With the coil current i L (t ) and the capacitor voltage uC (t ) the mathematical model is obtained by making use iL iR uC C L R(uC ) (a) RLC circuit of the van–der–Pol–oscillator. (b) Nonlinear characteristic curve (1.2) for Æ = Ø = 1. Figure 1.4: Circuit and characteristic curve of the van–der–Pol oscillator. 1.3 Examples of nonlinear systems 5 of Kirchhoff’s rules. This yields d L i L = uC (1.3a) dt d C uC = °i L ° i R (uC ) = °i L ° ÆuC (uC2 ° Ø). (1.3b) dt p p Introduction of the new variables ≤ = L/C , ø = t / LC and x 1 (ø) = i L (t ), x 2 (ø) = uC (t ) results in the state space representation ↳ the right format ? so the scaling equations get d x2 x 1 = f 1 (x) = (1.4a) dø ≤ d ° ¢ x 2 = f 2 (x) = °≤ x 1 + Æx 2 (x 22 ° Ø). (1.4b) dø Figure 1.5 shows the vector field [ f 1 , f 2 ]T in the (x 1 , x 2 )–plane together with the numerically computed solution 1.5 1.5 > - We "choose" the initial state ? 1 1 The trajectory of X is determined 0.5 0.5 by the vector field of I 0 0 larger > - vectors "push" state -0.5 -0.5 "faster" > - changing E changes -1 -1 = & which non- - ↳ changes linear the trajectory of X -1.5 resistance -1.5 -1 0 1 -1 0 1 (a) ≤ = 1 (b) ≤ = 10 > - switching behaviour ? Figure 1.5: Vector fields and trajectories for the van–der–Pol oscillator (1.4) für ≤ 2 {1, 10}. trajectory of (1.4) for the initial state x(0) = [1, 0.75]T. For ≤ = 1 the emergence of a limit cycle becomes apparent from Figure 1.5(a). Increasing ≤ changes the shape of the limit cycle as is shown in Figure 1.5(b) for ≤ = 10. In particular, trajectories can be split into two very fast and two very slow parts (see the behavior of the corresponding vector field). In the limit as ≤ ! 1 one obtains from (1.4) the relations d x 1 = 0, 0 = x 1 + Æx 2 (x 22 ° Ø). dø According to Figure 1.5(b) the trajectory passes along x 1 = °Æx 2 (x 22 ° Ø) on the slow parts and hence on the characteristic curve (1.2). Due to the special shape of the characteristic curve at the local minimum and the local maximum of x 1 = °Æx 2 (x 22 ° 1) a jump to the respective other branch of the curve is obtained. In the limit as ≤ ! 1 the van–der–Pol oscillator can be interpreted as a switching logic that periodically switches between two states. 1.3.2 Euler–Lagrange equations Mathematical modeling of mechanical systems in general results in a nonlinear system description, e.g., due to large deflections or rotations. For rigid body systems the so–called Lagrange formalism yields a systematic energy–based modeling approach, which results in the so–called Euler–Lagrange equations. To illustrate this consider a rigid body systems that can be described by n generalized coordinates (corresponding the degrees–of–freedom) how > - many variables to define our system completely £ §T q = q1 ,... , qn (1.5) 6 Chapter 1 Introduction that are subject to n generalized forces £ §T Q = Q 1 ,... ,Q n. (1.6) The Lagrange function L = Wkin ° Wpot is defined as the difference between the stored kinetic energy Wkin and the stored potential energy Wpot. With this, the system dynamics follows from the Euler–Lagrange equations d @L @L ° =Qj, j = 1,... , n. (1.7) dt @q˙j @q j If Q j (t ) = 0 for all j = 1,... , n, then the system is called conservative since the total energy stored in the system remains unchanged during motion. In other words there is no dissipation. The equations of motion (1.7) can be reformulated due to L(q(t ), q̇(t )) = Wkin (q(t ), q̇(t )) ° Wpot (q(t )) in the standard form M (q)q̈ +C (q, q̇)q̇ + g (q) = Q (1.8) with the mass matrix M (q), the matrix C (q, q̇) of coriolis and centrifugal contributions and the vector g (q) of potential forces. The formulation (1.8) confirms that the equations of motion of a rigid body system are in general nonlinear. It should be remarked that the kinetic energy is composed of a translational and a rotational contribution and can be written in general as 1 1 Wkin = mv Tc v c + !T J !. (1.9) 2 2 Here, v c (t ) is the translational velocity vector of the body’s center of mass, J is the inertia matrix and !(t ) is the angular velocity vector. Note that J and ! have to be formulated in the same coordinate system. An evaluation in a body–fixed coordinate system is recommended since there J is independent of the motion of the rigid body. Due to the complexity of the arising expressions the application of a computer algebra systems such as Mathematica or Maxima is recommended for the evaluation of (1.7) or (1.8), respectively. Example 1.1 (Pendulum on a cart). The pendulum on a cart example shown in Figure 1.6 extends the classical mathematical pendulum. The pendulum is supposed to have length l and mass m while the cart has mass M. The force F (t ) acting on the cart is considered as input and can be realized by means of a suitable drive. Given the vectors 2 3 ∑ ∏ l x pend 6 x + sin(') 7 r cart c = , rc =4 l 2 5 0 cos(') 2 to the centers of mass of the cart and pendulum, respectively, the corresponding velocity vectors are obtained as ' l , m, J z x F (t ) M Figure 1.6: Pendulum on a cart example. drive eq of motion" "How to need to understand I complicated , no in depth) 1.3 Examples of nonlinear systems 7 2 3 l ∑ ∏ ẋ + cos(') ˙ ' ẋ pend 6 2 7 v cart c = , vc =6 4 l 7. 5 0 ° sin(')' ˙ 2 Taking into account Steiner’s theorem the moment of inertia of the pendulum with respect to the suspension point is given by J = ml 2 /3. With this, the evaluation of (1.9) yields 1 ° ¢T cart 1 ° pend ¢T pend 1 2 & Rotation Wkin = M v cart c vc + m vc vc + J' ˙ 2 2 2 µ ∂ 1 1 l2 2 ml 2 2 = M ẋ 2 + m ẋ 2 + l ẋ ' ˙ cos(') + ' ˙ + ˙. ' 2 2 4 6 The stored potential energy is given by l Wpot (t ) = mg cos('). 2 With the generalized coordinates q(t ) = [x(t ), '(t )]T and the generalized forces Q(t ) = [F (t ), 0]T the evaluation of (1.7) after some intermediate computations results in ˙ 2 sin(')) 6g (m + M ) sin(') ° 3 cos(')(2F + l m ' ¨= ' l (m + 4M + 3m sin2 (')) ˙ 2 sin(') ° 3mg sin(2') 8F + 4l m ' ẍ =. 5m + 8M ° 3m cos(2') Lagrange ˙ ), x(t ), ẋ(t )]T and the input u(t ) = F (t ) the state space representa- Introducing the state vector x(t ) = ['(t ), '(t tion 2 3 2 3 x2 0 2 3 6 2 7 x1 6 6g (m + M ) sin(x 1 ) ° 3 cos(x 1 )(l mx 2 sin(x 1 )) 7 6 °6 cos(x 1 ) 7 d 6 7 6 7 6 7 x 6 27 = 6 2 l (m + 4M + 3m sin (x 1 )) 7 6 l (m + 4M + 3m sin (x 1 )) 7 6 2 7u 6 7+ dt 4x 3 5 6 x4 7 66 0 7 7 6 7 4 5 x4 4 4l mx 22 sin(x 1 ) ° 3mg sin(2x 1 ) 5 8 5m + 8M ° 3m cos(2x 1 ) 5m + 8M ° 3m cos(2x 1 ) is obtained for t > 0 with the initial condition x(0) = x 0 at t = 0. Example 1.2 (Ball and beam). A ball of mass m K is rolling on a pivoted beam (mass m B , moment of inertia with respect to center of mass J B ). By means of an external drive a torque M is applied at the suspension point (see Figure 1.7). Under the assumption that the ball can be considered a point mass with negligible radius the position vector from the origin to the ball’s center of mass is given by ∑ ∏ kugel r cos(') rc =. r sin(') With this, the Lagrange function is obtained as 1 ° ¢ 1 L = m K r˙2 + r 2 ' ˙ 2 + JB ' ˙ 2 ° m K g r sin('). 2 2 Taking into account the generalized coordinates q(t ) = [r (t ), '(t )]T and the generalized forces Q(t ) = [0, M (t )]T the evaluation of (1.7) yields the equations of motion in the form ˙ 2 ° g sin(') r¨ = r ' 1 ° ¢ ¨= ' 2 M ° m K g r cos(') ° 2m K r r˙' ˙. mr + J B 8 Chapter 1 Introduction x2 r ' M x1 Figure 1.7: Ball and beam example. ˙ ), r (t ), r˙(t )]T and the input variable u(t ) = M (t ) provides the state Introducing the state vector x(t ) = ['(t ), '(t space representation 2 3 2 3 2 3 x2 0 x1 6 m g x cos(x 1 ) + 2m K x 2 x 3 x 4 7 6 1 7 d 6 7 6° K 3 7 6 7 6x 2 7 = 6 2 7 6 2 7 dt 4x 3 5 6 mx 3 + J B 7 + 6 mx 3 + J B 7 u. 4 x4 5 4 0 5 x4 2 x 3 x 2 ° g sin(x 1 ) 0 The ball and beam example has been considered as a benchmark example for the evaluation of nonlinear control techniques (Hauser et al., 1992). though its ↳ cited highly paper even a simple example -> nice manip of equations Example 1.3 (Rotational motion of a satellite). If the rotating satellite schematically shown in Figure 1.8 is considered a rigid body, its rotational motion can be described by the equations ˙ = °! £ (£!) + M. £! > - eq. of Motion > - Euler equations (1.10) Herein 2 3 2 3 2 3 !1 £11 £12 £13 M1 ! = 4!2 5 , £ = 4£21 £22 £23 5 , M = 4M 2 5 !3 £31 £32 £33 M3 with the vector !(t ) of rotational velocities, the matrix £ of the moments of inertia and the vector M(t ) of applied torques. The quantities !(t ), £ and M(t ) are given in the satellite-fixed coordinate system (01 , x 11 , x 12 , x 13 ) with origin 01. If this coordinate system is placed in the main axes of inertia of the satellite, then 2 3 £11 0 0 £=4 0 £22 0 5. (1.11) 0 0 £33 and (1.10) reduces to ° ¢ ˙ 1 = ° £33 ° £22 !2 !3 + M 1 £11 ! ° ¢ ˙ 2 = ° £11 ° £33 !1 !3 + M 2 £22 ! (1.12) ° ¢ ˙ 3 = ° £22 ° £11 !1 !2 + M 3. £33 ! 1.3 Examples of nonlinear systems 9 Body–fixed coordinate system (1) x 13 !3 x 12 x 03 01 !2 x 02 x 11 0 !1 x 01 Intertial system (0) Figure 1.8: Rotational motion of a satellite. 1.3.3 Position control under static friction Figure 1.9 schematically shows a mass m sliding on a rough surface with the spring force F k (t ) = kx(t ), the friction force F r (t ) and the input force u(t ). With friction force models, a fundamental distinction is made > mass is - in motion > Coulomb - x0 x friction is overcome > - there is one phase where the face doesn't overcome m the Coulomb friction k Controller > - both u phases have to modelled - - not be simple Fk Fr Figure 1.9: Spring–mass-system with static friction. between static and dynamic models, whereby for the static model the friction force is specified purely as d a function of the speed v(t ) = dt x(t ). The friction force is generally composed of a viscous component 1 proportional to the speed F r,v = r v v, (1.13) a Coulomb component (dry friction)2 F r,c = r c sign(v) (1.14) and a static friction component r h. In (1.14) r c can be assumed directly proportional to the normal force, so that for the configuration in Figure 1.9 the relation r c = µmg applies, with the sliding friction coefficient µ. It has been experimentally observed that the friction force in areas of low velocity v(t ) can decrease. This is known as the Stribeck effect. The speed v s , at which the friction force is minimal, is called accordingly the Stribeck velocity. Figure 1.10 shows the individual components. These three contributions are often summarized in a common ansatz for the overall friction ° ¢ ≥ ≥ v ¥2 ¥ F r = r v v + r c sign(v) + r h ° r c exp ° sign(v) (1.15) v0 Stribeck curve with a reference velocity v 0. 1 This is the case, for example, if there is a liquid or lubricant between the friction surfaces. 2 This proportion is motivated by the direct contact of the rubbing surfaces. 10 Chapter 1 Introduction F r,h Stribeck curve rc Coulomb friction > - overcome a certain force to create movement ("normal" friction) Viscous friction °v s velocity > dependent - component vs Nv °r c °F r,h Figure 1.10: Contributions to the static friction model. Remark 1.1 In addition to static friction models, various dynamic friction models can be found in the literature. These are essentially based on a brush–like contact model of two rough surfaces. Often the so–called LuGre model is used (for further details the reader is referred to the literature). The mathematical model of the mass sliding on a rough surface as shown in Figure 1.9 reads ( ẋ = v striction condition satisfied, i.e., v(t ) = 0, |u(t ) ° kx(t )| ∑ r h · (1.16a) v̇ = 0 and 8 < ẋ = v · ° ¢ stiction condition not satisfied (1.16b) :v̇ = 1 u ° kx ° F r m with the friction force F r (t ) given by (1.15). Note that the model is written with respect to the relaxed position of the spring. · The implementation of the mathematical model into a numerical simulation code such as MATLAB/Simulink, Octave or Python requires the correct realization of the events induced by the structural model change imposed by either (1.16a) or (1.16b). Subsequently an efficient implementation is provided using a Level–2 MATLAB S–Function. 1.3 Examples of nonlinear systems 11 Simulink-better/easier than Matlab in this d case ↳ block oriented modelling ↳ graphical plugin for Matlab function mass_with_friction(block) % % Simulation model for a single mass with friction % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Description: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % inputs: u... input force % states: x(1)... position of mass % x(2)... velocity of mass % outputs: y1(1)... x % y1(2)... v % y2(1)... Flag "stuck" % parameters: % p(1)... k spring constant % p(2)... m mass % p(3)... r_c Coulomb friction constant % p(4)... r_v viscous friction constant % p(5)... r_h static friction constant % p(6)... v_0 reference velocity % p(7)... xini initial position of mass % p(8)... vini initial velocity of mass %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Sample Time: Continuous %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% setup(block); function setup(block) % Register number of input and output ports block.NumInputPorts = 1; block.NumOutputPorts = 2; % Register number of continuous states block.NumContStates = 2; % Register dialog parameter block.NumDialogPrms = 8; % Port dimensions block.InputPort(1).Dimensions = 1; block.InputPort(1).SamplingMode = ’Sample’; block.InputPort(1).DirectFeedthrough = false; block.OutputPort(1).Dimensions = 2; block.OutputPort(1).SamplingMode = ’Sample’; block.OutputPort(2).Dimensions = 1; block.OutputPort(2).SamplingMode = ’Sample’; % Set block sample time to continuous time block.SampleTimes = [0 0]; % Register methods block.RegBlockMethod(’InitializeConditions’, @InitConditions); block.RegBlockMethod(’Outputs’, @Output); block.RegBlockMethod(’Derivatives’, @Derivatives); block.RegBlockMethod(’Terminate’, @Terminate); 12 Chapter 1 Introduction function InitConditions(block) % define parameters xini = block.DialogPrm(7).Data; vini = block.DialogPrm(8).Data; x0(1) = xini; x0(2) = vini; block.ContStates.Data=x0; function Output(block) % define x, y, u, p for better code readability x = block.ContStates.Data; u = block.InputPort(1).Data; k = block.DialogPrm(1).Data; r_h = block.DialogPrm(5).Data; % set value of output y1(1) = x(1); y1(2) = x(2); stuck = 0.0; if (abs(u-k*x(1)) 0, x(0) = x 0. (1.17) j =1 14 Chapter 1 Introduction This is still 1 33.. responses to Pl controller when ↓ are regarded all frictions PI-controller : 1 u = - ko(r x) + k = - S(r x)de - 1.2._ = n 1 0.5 ----- 0.8 x 0 v 0.6 · "Over-fundershooting 0.4 -0.5 position of masy " ⑧ 0.2 0 -1 0 10 20 30 40 50 60 0 20 40 60 Excercise - 1 1. t t how to avoid (a) Time evolution of position x(t ). (b) Time evolution of velocity v(t ). the emergence of Limit cycle? possibilities a > - add : 1 an estimator for 6 the friction > add "dead zone" ? 0.5 - 4 0 v 2 u -0.5 0 -1 -2 0 0.5 1 1.5 0 10 20 30 40 50 60 x t (c) Trajectory (x(t ), v(t )). (d) Input u(t ) (closed–loop). Figure 1.12: PI position control of the spring–mass–system (1.16) with static friction. 1 3.. 4 - > The vehicle can move in the u 1 –direction and can turn but cannot move in or along the direction of the axle (rolling without sliding). In particular the kinematic model according to (1.17) reads 2 3 2 3 2 3 u 1 cos(x 3 ) cos(x 3 ) 0 ẋ = 4 u 1 sin(x 3 ) 5 = 4 sin(x 3 ) 5 u 1 + 405 u 2 , t > 0, x(0) = x 0 (1.18) u2 0 1 | {z } |{z} = g 1 (x) = g 2 (x) with (x 1 (t ), x 2 (t )) denoting the position of the axle center and x 3 (t ) the steering angle. The equilibria or operating points, respectively, of the system can be easily computed as 32 x 1,S ∑ ∏ 0 x S = 4x 2,S 5 für u S = 0 x 3,S with arbitrary but constant x j ,S , j = 1, 2, 3. The linearization of the system at x S hence yields 2 3 2 3 0 0 0 cos(x 3,S ) 0 XX ¢ẋ = 40 0 05 ¢x + 4 sin(x 3,S ) 05 ¢u. 0 0 0 0 1 | {z } | {z } =A =B In this case Kalman’s controllability matrix reduces to ↓ definition ? 1.3 Examples of nonlinear systems 15 > - M = Un. 2s(Xz) Xz = Un · Sin (xz) u1 Xz = Uz ! A Unsin(X3) Equilibria : 0 = un. cos(X3) x3 0 = U1. sin(Xz) x2 0 = uz ----- Cos(X3) =12 - Un - = 0 + only choice of equilibrium u2 with be. at Los Sin cannot be zers * the same time arbitrary > Linearize - model (Taylor) X => Linearization Loss of information > - in this example : loss of crucial information / essential information x1 for the controller ↳ this Figure 1.13: Kinematic substitute model of a vehicle front axle. system can only be controlled in a nonlin way controllability matrix 2 3 £ cos(x 3,S ) § 0 0 0 0 0 0 0 2 S(A, B ) = B AB A B = 4 sin(x 3,S ) 0 0 0 0 0 0 05 0 1 0 0 0 0 0 0 so that S(A, B ) is of rank 2. Thus, the linearization of the kinematic vehicle model at an arbitrary equilibrium point is not completely controllable, which contradicts experience. This example illustrates that structural properties such as controllability, observability or stabilizability might be lost during the linearization of a nonlinear system. This motivates the need to generalize these concepts to nonlinear systems. 1.3.5 Chemical engineering > - will also be done in the excercise Subsequently the mathematical model of a continuous stirred tank reactor (CSTR) as shown schematically in Figure 1.14 is determined as a representative of chemical engineering applications (see, e.g., Baehr and Stephan, 1996; Jakobsen, 2008). For this it is assumed that the reactor is ideally mixed so that no spatial differences in concentration or temperature arise. The CSTR is fed with a component A of (molar) concentration c in (t ) through the inlet with constant volume flow q. At time t = 0 the reactor is free of component A. The temperature Tk (t ) in the cooling jacket can be adjusted by means of the cooling power q k (t ), which is imposed, e.g., by hot steam or some cooling fluid. The liquid phase reactions are assumed to be governed by the van–der–Vusse reaction scheme A ! B ! C, 2A ! D. According to this scheme the reactant A is converted into the desired product B. By–products C and D are produced by secondary reaction and a parallel reaction, respectively (Klatt and Engell, 1993; Chen et al., 1995). The model equations are obtained by taking into account the total mass balance, the component mass balances and the energy balances for reactor and cooling jacket. This yields ċ A = r A (c A , T ) + (c in ° c A )u 1 Stoptheorie-Kinetik ċ B = r B (c A , c B , T ) ° c B u 1 (1.19) Ṫ = h(c A , c B , T ) + ∑1 (Tk ° T ) + (Tin ° T )u 1 Ṫk = ∑2 (T ° Tk ) + ∑3 u 2. Herein, c A (t ) and c B (t ) denote the (molar) concentrations of reactant A and product B while T (t ) is the reactor temperature. The model does not contain balance equations for the by–products C and D since they have no influence on the relevant process equations. The reaction rates r A and r B and the term h describing the effect 16 Chapter 1 Introduction A Inlet q, c in , Tin c A , cB , T qk V Tk (t ) A, B, C , D Outlet q Figure 1.14: Schematics of the CSTR. Symbol Unit Value Symbol Unit Value ∑1 1/h 30.828 ∑2 1/h 86.688 ∑3 K/kJ 0.1 ∑4 m3 K/kJ 3.522 £ 10°4 Tin ± C 104.9 c in mol/m3 5.1 £ 103 k 1,0 1/h 1.287 £ 1012 k 2,0 m3 /(mol h) 9.043 £ 106 E1 - 9758.3 E2 - 8560.0 ¢H AB kJ/mol 4.2 ¢HBC kJ/mol -11 ¢H AD kJ/mol -41.85 Table 1.1: Typical parameters for the CSTR with van–der–Vusse reaction scheme. of the reaction on the temperature T are included by the following ansatz functions r A (c A , T ) = °k 1 (T )c A ° k 2 (T )c 2A r B (c A , c B , T ) = k 1 (T )(c A ° c B ) (1.20) £ § h(c A , c B , T ) = °∑4 k 1 (T )(c A ¢H AB + c B ¢HBC ) + k 2 (T )c 2A ¢H AD. The temperature dependent functions k 1 (T ) and k 2 (T ) are the so–called Arrhenius terms ≥ °E j ¥ k j = k j ,0 exp , j = 1, 2. T /±C + 273.15 The input variables are given by the volumetric flow rate u 1 (t ) = q(t )/V and the cooling power u 2 (t ) = q k (t ). In the real process additional nonlinearities arise, e.g., by the so–called fouling effect that reduces the heat transfer between cooling jacket and reactor over the reaction time. Typical system parameters are summarized in Table 1.1, see also (Rothfuß et al., 1996; Rothfuß, 1997). An exemplary implementation of the model equations using a MATLAB m–Function is provided in the following. function [t,x,u,p]=vandervusse_system; %=================================================================== %Example: van-der-Vusse reactor %=================================================================== % ------------------------------------------------------------------ %Set parameters and initial condition p.k10 = 1.287e12; p.k20 = 9.043e6; p.E1 = 9758.3; 1.3 Examples of nonlinear systems 17 p.E2 = 8560.0; p.kappa1 = 30.828; p.kappa2 = 86.688; p.kappa3 = 0.1; p.kappa4 = 3.522e-4; p.dHAB = 4.2; p.dHBC = -11.0; p.dHAD = -41.85; p.Tzu = 104.9; p.czu = 5.1e3; x0 = [2.0,1.08,108.0,107.7]’; % ------

Use Quizgecko on...
Browser
Browser