@lay:3008.more Second-Order Nonlinear Control System A block diagram of an instrument servo system containing a saturating amplifier is shown in Figure 7. It is desired to obtain the output phase trajectory for a reference input of 5 units. @lay:place 3008f7.eps here @fig:Figure 7. Block diagram of an Instrument Servo Every block of the control system can be modeled by the four-terminal device as shown in Figure 8. The zero current source JI is artificially introduced to permit the voltage between nodes I and GI, VJI, to be used as the input variable for the amplifiers and transfer functions and presents infinite load impedance to the preceding stage. The voltage source EO results in zero source impedance for the following stage. These considerations allow the devices to be interconnected either with other models or with ordinary electrical circuits. @lay:place 3008f8.eps @fig:Figure 8. General Four-Terminal Model, Input-Output Characteristic of Saturating Amplifier The output source EO performs the actual task of the device. For the ideal amplifier Ks with a gain of 1 its value is EO = VJI. The model is temporarily stored in the MODEL DESCRIPTION with the name GAIN. The characteristic of the saturating amplifier is shown in Figure 8 and is described by TABLE 1 in model GSAT. Thus EO is just TABLE 1 (VJI). To model a general transfer function, the following approach is used (detailed information may be found in Resources 1 and 3). Let G(s) be the n-th order transfer function: \[ G(s)=\frac{a_{m}s^{m}+a_{m-1}s^{m-1}+\cdots+a_{1}s+a_{0}} {b_{n}s^{n}+b_{n-1}s^{n-1}+\cdots+b_{1}s+b_{0}} \] The voltage source EO must be given as: \[ EO=a_{m}P_{m+1}+a_{m-1}P_{m}+\cdots+a_{1}P_{2}+a_{0}P_{1}.\] The n-th derivative of the transfer function is supplied under DEFINED PARAMETERS as: \[ DP_{n}=\frac{V_{JI}-b_{n-1}P_{n}-\cdots-b_{0}P_{1}}{b_{n}}.\] The remaining (n-1) derivatives are also supplied under DEFINED PARAMETERS in the repetitive form: \[ DP_{n-1}=P_{n} \] \[ DP_{n-2}=P_{n-1} \] \[ \vdots \] \[ DP_{1}=P_{2}.\] In this example a 2nd order model is used: \[ G(s)=\frac{3}{s^{2}+s} \] The model is stored with the name 2ORDER. Finally all models must be connected according to fig. 9 observing the correct polarity for the summing junction. The SCEPTRE input reads as follows: MODEL GAIN (TEMP) (I-O-GI-GO) ELEMENTS JI, I-GI = 0.0 EO, GO-O = X1 (VJI) MODEL GSAT (TEMP) (I-O-GI-GO) ELEMENTS JI, I-GI = 0.0 EO, GO-O = TABLE 1 (VJI) FUNCTIONS TABLE 1 = -100, -1, -1, -1, 1,1, 100,1 MODEL 2ORDER (TEMP) (I-O-GI-GO) ELEMENTS JI, I-GI = 0.0 EO, GO-O = X0 (3.0*P1) DEFINED PARAMETERS DP2 = X2 (VJI-P2) DP1 = X3 (P2) P2 = 0 P1 = 0 CIRCUIT DESCRIPTION ELEMENTS EIN, 9-1 = 5 A1, 1-4-8-5 = MODEL GAIN A2, 4-6-5-7 = MODEL GSAT G1, 6-8-7-9 = MODEL 2ORDER DEFINED PARAMETERS PDEO = X4 (3.0*P2G1) OUTPUTS PDEO(RATE),EOG1(ANGLE) VJIA1,EOA1,EOA2 RUN CONTROLS STOP TIME = 10 END @lay:Please insert figure 9 here 3008f9.eps @fig:Figure 9. Block diagram in SCEPTRE form The output phase trajectory is a plot of the time derivative of the output signal versus the output signal and is shown in fig. 10. Remember to use the correct suffixes from the CIRCUIT DESCRIPTION. Therefore the wanted output signal is the voltage EOG1. For the time derivative PDEO yields: \[ EOG1 = a_{0}P_{1} \] \[ PDEO = \frac{d}{dt}(EOG1)=a_{0}DP_{1}=a_{0}P_{2}=3P_{2}.\] @lay:Please insert figure 10 here 3008f10.eps @fig:Figure 10. Phase trajectory of servo system with saturation 5.4 Nonlinear Pendulum This example solves the elementary equation of a pendulum, which is given as \[ \ddot{x}+\sin x = 0.\] The substitution \[ y = \dot{x} \] results in two differential equation \[ \dot{x} = y \] \[ \dot{y} = \sin x \] which can be easily solved in SCEPTRE: CIRCUIT DESCRIPTION DEFINED PARAMETERS DPX = X1 (PY) DPY = X2 (-SIN(PX)) PX = 0.5 PY = 0 OUTPUTS PX,PY RUN CONTROLS INTEGRATION ROUTINE = IMPLICIT STOP TIME = 20 RERUN DESCRIPTION (3) DEFINED PARAMETERS PX=1,2,3 RERUN DESCRIPTION (3) DEFINED PARAMETERS PX=0.5, 0.5, 0.5 RUN CONTROLS INTEGRATION ROUTINE = XPO, TRAP, RUK END The simulation is initially started with a small amplitude (PX=0.5), this initial amplitude is increased in three following reruns (PX=1,2,3). Another 3 reruns keep the initial amplitude constant (PX=0.5,0.5,0.5) but change the integration routines (XPO,TRAP,RUK). The output of the master run and the first 3 reruns is shown in fig. 11 . For small initial conditions (i. e. amplitudes) the phase trajectories are almost circles (equal scaling for x- and y-axes assumed), the system behaves linear. With increasing amplitudes the circles are deformed, the pendulum becomes nonlinear. The second set of reruns is used to check the quality of the integration routines. As the system does not loose energy, the phase trajectories must represent closed curves (to be seen in fig. 11). For these equations the IMPLICIT and RUK (Runge Kutta) integration routines result in a stable solution, whereas XPO (exponential) and TRAP (trapezoidal) diverge. But this is not a general statement. The stability of the various integration routines depends strongly on the type of equations to be solved. @lay:Please insert figure 11 here 3008f11.eps @fig:Figure 11. Phase Trajectory of the Nonlinear Pendulum with different initial Amplitudes