### Create a StudySoup account

#### Be part of our community, it's free to join!

Already have a StudySoup account? Login here

# Non-Linear Intro EE 5323

UTA

### View Full Document

## 163

## 2

1 review

## Popular in Non-Linear Systems

## Popular in Electrical Engineering

This 8 page Class Notes was uploaded by Bharath Reddy Alugubelly on Friday February 5, 2016. The Class Notes belongs to EE 5323 at University of Texas at Arlington taught by Dr. Frank Lewis in Winter 2016. Since its upload, it has received 163 views. For similar materials see Non-Linear Systems in Electrical Engineering at University of Texas at Arlington.

## Reviews for Non-Linear Intro

Why didn't I know about this earlier? This notetaker is awesome, notes were really good and really detailed. Next time I really need help, I know where to turn!

-*Mr. Verna Berge*

### What is Karma?

#### Karma is the currency of StudySoup.

#### You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 02/05/16

© Copyright F.L. Lewis 1999 All rights reserved Updated:Tuesday, August 05, 2008 STATE VARIABLE (SV) SYSTEMS A natural description for dynamical system s is the nonlinear state-space or state variable (SV) equation x = f (x,u) y = h x u)1 ( with x(t)∈R the internal state, u(t)∈R m the control input, aned h y(t)t∈R p measured output. These equations are nonlin ear and can capture very general system behaviors. The nonlinear state equation follows in a natural manner from a physical analysis of naturally occurring systems, using, for instance, Hamilton's equations of motion or Lagrange's equation of motion d ∂L − ∂L = F , dt ∂q ∂q ▯ with q(t) the generalized position vector, qt the generalized velocity vector, and F(t) the generalized force vector. The Lagrangian is L= K-U, the kinetic energy minus the potential energy. Using La grange's equation, one can derive the nonlinear function f(x,u). The output function h(x,u) depends on the measurements selected by the design engineer. Note that the SV model has m inputs, n states, and p outputs, so it can represent complicated multivariable (multi-input/multi-output) systems such as modern aerospace systems, automobiles, submarine vehicles, etc. The nonlinear state-space system has the st ructure shown in the figure. Note that it contains an integrator, which acts as the memory of this dynamical system. u(t) dx(t/dt 1 x(t) y(t) (x,u) s h(x,u)) Noonlneear State-Sppace Syystem 1 The linear state-space equations are given by x = Ax + Bu y = Cx + Du where A is the system or plant matrix, B is the control input matrix, C is the output or measurement matrix, and D is the direct feed ma trix. This description is said to be time- invariant if A, B, C, D are constant matrices . These equations are obtained directly from a physical analysis if the system is inherently linear. The linear state-space system has the fo rm shown in the figure. It has more structure than the nonlinear SV system. For th at reason, control system design is easier for linear SV systems. Note that the feedback is determined only by the system A matrix. The direct feedback matrix D is often equal to zero for many systems. D u()t) dx()/dtt 1 x()t) y(t)) B s C A LinearStateSppaceSyyseme If the system is nonlinear, then the state equations are nonlinear. In this case, an approximate linearized system description may be obtained by computing the Jacobian matrices ∂f ∂f ∂h ∂h A ( , ) , B( , ) = , C ( , ) = , D ( , ) = . ∂x ∂u ∂x ∂u These are evaluated at a nominal set point (x,u) to obtain constant system matrices A,B,C,D, yielding a linear time-invariant stat e description which is approximately valid for small excursions about the nominal point. The Jacobian resulting from differentiation of a p-vector function h with respect to an m-vector variable u = u 1 u2 " u m T is a p×m matrix found as ∂h ⎡ ∂h ∂ h ⎤ = ⎢ " ⎥ . ∂u ⎣ ∂u1 ∂u2 ⎦ 2 Example 1 A second-order differential equation of the sort occurring in robotic systems is 2 mq + mLq + mgL sinq =τ where q(t) is an angle andτ(t) is an input torque. By defining the state x [x] x T as 1 2 x1= q(t), x2= q(t) one may write the state equation x = x 1 2 2 1 x2= −Lx − g2 sin x1+ u m where the control input is u(t)=τ(t). To solve the second-or der differential equation one requires two initial conditions, e.g. q(0), (.0 Thus, there are two state components. The state components correspond to energy storage variables. For instance, in this case one could think of potential energy mgh (the third term in the differential equation, 2 which involves q t ), and rotational kinetic energy mω (the second term, which involves ω = q t ). This is a nonlinear state e quation. One can place it in to the form (1) simply by noting that x = x] x T and writing 1 2 ▯ ⎡ x2 ⎤ ⎡x1⎤ = ⎢ 1 ⎥ ≡ f (x,u) ⎣x2⎦ ⎢− Lx 2− gL sinx1 + u⎥ ⎣ m ⎦ This defines f(x,u) as the given nonlinear function 2-vector. By computing the Jacobians, the linear SV representation is found to be 0 ⎡ 0 1 ⎤ ⎡1 ⎤ x = ⎢− gL cos x − 2Lx ⎥x + ⎢ ⎥u = Ax + Bu . ⎣ 1 2⎦ ⎣m ⎦ Evaluating this at a nominal equilibrium point of x=0, u=0 yields the linear time-invariant state description 0 1 ⎡0 ⎤ x = ⎡ ⎤x + ⎢1 ⎥u = Ax + Bu ⎣− gL 0⎦ ⎢ ⎥ ⎣m ⎦ which describes small excursions about the origin. 3 fTnction f(x,u) is given by the dynamics of th e system. By contrast, the output function h(x,u) is given by which measurements the engineer decides to take. It is easy to measure angles using an optical encoder. However, measuring angular velocities requires a tachometer, which is more expensive. Therefore, suppose we decide to measure the robot joint angle x1= q . Then the output function is given as y = h(x,u) = [1] 0 x . This equation is linear and directly defines the matricesC = 1 0 ,] D = 0 . 4 COMPUTER SIMULATION Given the state-space description it is very easy to simulate a system on a computer. All one requires is a numerical in tegration routine such as Runge-Kutta that computes the state derivative using x = f (x,u) to determine x(t) over a time interval. MATLAB has an integration rou tine 'ode23' that can be used to simulate any nonlinear system in state-space form. For linear sy stems, MATLAB has a variety of simulation routines including 'step' for the step res ponse, etc., however, it is recommended that 'ode23' be used even for linear systems, si nce it facilitates controller design and simulation. Example 2 To use 'ode23' one must write a function M- file that contains the state equations. To simulate the nonlinear system in Example 1, one may use the M-file: function xdot= robot(t,x) ; g= 9.8 ; L= 1 ; m= 10 ; u= sin(2*pi*t) xdot(1)= x(2) ; xdot(2)= -g*L*sin(x(1)) - L*x(2)^2 + u/m ; where we have assumed that L= 1m, m= 10 Kg. The control input is set to be a sinusoid. Using vector operations one could write the simpler M-file: function xdot= robot(t,x) ; g= 9.8 ; L= 1 ; m= 10 ; u= sin(2*pi*t) xdot= [x(2) ; -g*L*sin(x(1)) - L*x(2)^2 + u/m] ; Note that the semicolon is used to terminat e each line to avoid pr inting to the screen during computations. Given this M-file, stored in a file named 'robot.m', let's say, the following command lines compute and plot the time response over the time interval 0 to 20 sec: tint= [0 20] ; % define time interval [t0 tf] x0= [0 0.1]' ; % initial conditions [t,x]= ode23('robot', tint, x0); plot(t,x) Using this code, one obtains the figure shown. 5 0.15 0.1 0.05 0 -0.05 -0.1 -0.15 -0.2 0 2 4 6 8 10 12 14 16 18 20 Time plot of x(1), x(2) vs. time A Phase-Plane plot is a graph of x(2) vs. x(1). To make this plot, one uses plot(x(:,1),x(:,2)) and obtains the figure shown. Note the use of the colon to select an entire column in an array. 0.15 0.1 0.05 0 -0.05 -0.1 -0.15 -0-0.05 -0.04 -0.03 -0.02 -0.01 0 0.01 0.02 0.03 0.04 0.05 Phase-plane plot of x(2) vs. x(1) In which direction does the plot move- clockwise or counterclockwise? 6 Using MATLAB, one is able to perform very quickly the most exotic of analysis, simulation, and plotting tasks. An intr oduction to MATLAB and some excellent demos are available at the MATLAB website www.mathworks.com . The next two samples are taken from Shahian and Hassul, "Contro l System Design Usi ng MATLAB," Prentice- Hall, 1993. 7 8

### BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.

### You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

## Why people love StudySoup

#### "Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

#### "I bought an awesome study guide, which helped me get an A in my Math 34B class this quarter!"

#### "I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

#### "Their 'Elite Notetakers' are making over $1,200/month in sales by creating high quality content that helps their classmates in a time of need."

### Refund Policy

#### STUDYSOUP CANCELLATION POLICY

All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email support@studysoup.com

#### STUDYSOUP REFUND POLICY

StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here: support@studysoup.com

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to support@studysoup.com

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.