• No results found

Simulation Analysis of Nonlinear Systems

4.3 Nonlinear Elements Modeling

A well-known technique for trying to predict limit cycles in nonlinear systems is the de-scribing function method [51]. Since this is an approximate method, it is very useful for comparative purposes when determining solutions by simulation. In this section nonlinear-ity modeling is discussed in more detail and then a simple system possessing a limit cycle is simulated.

4.3.1 Modeling of Piecewise Linear Nonlinearities

Static nonlinearities of any complexity can be constructed using existing Simulink blocks.

In this section, Simulink modeling of single-valued and double-valued nonlinearities is presented.

The single-valued static nonlinearity can be easily established with the one-dimensional look-up table block. For instance, consider the piecewise nonlinearity shown in Fig-ure 4.29(a), for known turning points (x1, y1), (x2, y2), . . ., (xN−1, yN−1), (xN, yN). One may select a point x0such that x0 < x1. The value y0can be easily computed from the nonlinear behavior. Also for another point xN+1such that xN+1> xN, the value of yN+1

can be obtained. Thus the two vectors x and y can be established such that x=[x0, x1, x2, . . . , xN, xN+1]; y=[y0, y1, y2, . . . , yN, yN+1];

Double click the one-dimensionalLook-Up Table block, to display the dialog box as shown in Figure 4.29(b). One should specify in theVector of input values and Vector of output values edit boxes, respectively, the vectors x and y, and then a single-valued nonlinearity can be set up successfully.

The construction of a general doubled-valued nonlinearity is not as simple as con-structing the single-valued case. For specific input signals it is possible to define these nonlinearities in terms of the input and its derivative, since one path around the nonlinear element will be taken when the input is increasing and another when it is decreasing. Thus, the approach will be valid for a sinusoidal input but not for a random input, or indeed for an input whose derivative changes within the double-valued region. An approach which can be use for these restricted situations is given below.

(a) single-valued nonlinearity (b) Dialog box of parameters

Figure 4.29. Construction of single-valued nonlinearities.

(b) saturated relay loop

Figure 4.30. Loop function expression.

Example 4.7. When there exist loops in the nonlinearity, apart from a few existing blocks in the Simulink block library, a general nonlinearity cannot be easily established. TheSwitch block can be used to tackle the problem.

Now consider the two double-valued loop nonlinearities shown in Figures 4.30(a) and (b). First, consider the loop nonlinearity shown in Figure 4.30(a). It can be seen that the loop function may be expressed by a single-valued nonlinearity when the input signal is increasing and by another single-valued nonlinearity when decreasing. This means that the single-valued nonlinearity is conditional. For instance, the two single-valued nonlinearities in Figure 4.31 can be used to express the loop nonlinearity in Figure 4.29(a).

The Simulink blockMemory can be used to extract the input signal at the previous time instance. Thus, the Simulink model shown in Figure 4.32 can be used to express the double-valued loop nonlinearity. A comparative block is used to check whether the input signal is increasing or not, i.e., by checking whether the current value is greater than its previous value or not. A switch block can be used to control the single-valued block selection, with theThreshold set to 0.5. If it is increasing, the switch block is set to the increasing block single-valued nonlinearity; otherwise the decreasing one is chosen. In this way, the double-valued loop nonlinearity can be established.

The two single-valued nonlinearities can be expressed individually by two table-look-up blocks given by

x1= [−3, −1, −1 + , 2, 2 + , 3], y1= [−1, −1, 0, 0, 1, 1], x2= [−3, −2, −2 + , 1, 1 + , 3], y2= [−1, −1, 0, 0, 1, 1],

-6

-6

(2, 0) (1, 1)

(−2, 0)

(−2, −1) (2, 1)

(2, 0) (−1, 0)

(−1, −1)

(a) when the input increases (b) when the input decreases

Figure 4.31. Loop function can be expressed as single-valued functions.

1 Switch Out1

>=

Relational Operator Memory

1 In1

u(t )increases

u(t )decreases

Figure 4.32. Double-valued relay nonlinearity (file: c4mloop.mdl).

where  can be set to a very small number. For instance, it can be set to the MATLAB reserved constanteps.

Consider now the nonlinearity shown in Figure 4.30(b). The previously established Simulink model can still be used to model the nonlinearity. The new sets of data should be used to modify the table-look-up blocks

x1= [−3, −2, −1, 2, 3, 4], y1= [−1, −1, 0, 0, 1, 1], x2= [−3, −2, −1, 1, 2, 3], y2= [−1, −1, 0, 0, 1, 1].

The Simulink model for the new loop nonlinearity can be expressed as shown in Figure 4.33.

It can be seen therefore that single-valued or double-valued static nonlinearities of any complexity can easily be modeled by Simulink blocks using similar methods. The nonlinearity can be used directly in simulation.

Example 4.8. Consider the double-valued nonlinearity shown in Figure 4.30(b). One may observe the distortion in the sinusoidal signals through it. To observe this distortion, the Simulink model can be established as shown in Figure 4.34.

If the magnitude A of the sinusoidal signal is set to 2, 4, and 8, the output of the nonlinearity can be obtained as shown in Figure 4.35.

1 Switch Out1

>=

Relational Operator Memory

1 In1

u(t )increases

u(t )decreases

Figure 4.33. Double-valued nonlinearity (file: c4mloopa.mdl).

u increasing

u decreasing

Switch Sine Wave

Scope

>=

Relational Operator Memory

Figure 4.34. Simulink model for sinusoidal distortions (file: c4msin.mdl).

0 2 4 6 8 10

−1

−0.5 0 0.5 1

← A = 2

← A = 4

← A = 8

Figure 4.35. Nonlinear distortion of sinusoidal inputs.

4.3.2 Limit Cycles of Nonlinear Systems

Nonlinear systems can have behaviors which are not present in linear systems. One such situation is the existence of a limit cycle, or self-oscillation, which can be attained when the system is released from different initial conditions.

double-valued nonlinearity

10 s+ 1

- - x2(t )

-6

x1(t )

-1 s

Figure 4.36. Block diagram of a nonlinear feedback system in Example 4.9.

2 Out2

1 Out1 u increasing

u decreasing

s+1 10 Transfer Fcn Switch

>=

Relational Operator Memory

1/s Integrator

−K−

Figure 4.37. Simulink model for Example 4.9 (file:c4mlimcy.mdl).

0 5 10 15 20 25 30 35 40

−3

−2

−1 0 1 2 3 4 5

(a) time domain simulation

−3 −2 −1 0 1 2 3 4 5

−0.5 0 0.5 1

(b) phase plane trajectory

Figure 4.38. Simulation result of nonlinear feedback system.

Example 4.9. Consider the typical nonlinear feedback system shown in Figure 4.36, with the nonlinear element shown in Figure 4.30(a), whose Simulink model is established in Figure 4.32. For such a feedback system, the Simulink model can be built up as shown in Figure 4.37. In the simulation model, the initial value of the integrator is set to one.

Let the simulation terminate time be 40 seconds, and to keep a high accuracy set the relative error tolerance (Relative tolerance) to 10−8, or to an even smaller value. With the following MATLAB code, the time response of the system, when there is no external input signal, can be obtained as shown in Figure 4.38(a).

>> [t,x,y]=sim(’c4mlimcy’,40); plot(t,y)

It can be seen that the signals x1(t )and x2(t )reach steady-state oscillations after the initial transients have died away. With the graphics functions plot(y(:,1),y(:,2))

provided in MATLAB, the phase plane trajectory appears as in Figure 4.38(b). It can be seen that the phase plane trajectory settles down at a closed curve, which is referred to as a limit cycle. A limit cycle is an interesting feature that may occur in a nonlinear system.