Model of a Relay-Controlled.Motor

The model of an armature-controlled dc motor was discussed in Section 8.6. See Figure
9.4-8. The model is
di .
L- = -RI – K~w+ v(t)
dt
dw .
1– = KTI – C(» – Td(t)

where the model now includes a torq e Td(t) acting on the motor shaft, due for example, to some unwanted source such as Coublriction or wind gusts. Control system engineerscall this a “disturbance.” These equations can be put into matrix form as follows, where X1 = i and X2 = w use the values R = 0.6Ω L=0.002H, Kt =0.04N.m/A Ke = 0.04 V s/rad ,c = 0.01 N .m . s/rad, and I = 6 x 10-5 kg . m2.

. Suppose we have a sensor that measures the motor speed, and we use the sensor’s signal to activate a relay to switch the applied voltage v(t) between 0 and 100 V to
keep the speed between 250 and 350 rad/s. This corresponds to the relay logic shown in Figure 9.4-7b, with SwOff = 250, SwOn = 350, Off = 100, and On = O. Investigate how well this scheme will work if the disturbance torque is a step function that increases from 0 to 3 N . m, starting at t = 0.05 s. Assume that the system starts from rest with w(O) = 0 and ¡(0) = o.

• Solution
For the given parameter values,
A = [-300. -20]
666.7 -166.7 [
500 0] o -16667
To examine the speed w as output, we choose C = [0, I] and D = [0, 0]. To create this simulation, first obtain a new model window. Then do the following.

1. Select and place in the new window the Step block from the Sources library. Label it Disturbance Step as shown in Figure 9.4-9. Double-click on it to obtain the Block Parameters window, and set the Step time to 0.05, the Initial and Final values to 0 and 3, and the Sample time to O. Click OK.
2. Select and place the Relay block from the Discontinuities library. Double-click on it, and set the Switch-on and Switch-off points to 350 and 250, and set the Output when on and Output when off to 0 and 100. Click OK.
3. Select and place the Mux block from the Signal Routing library. The Mux block combines two or more signals into a vector signal. Double-click on it, and set the

Number of inputs to 2, and the Display option to signals. Click OK. Then click on the Mux icon in the model window, and drag one of the comers to expand the box so that all the text is visible.
4. Select and place the State-Space block from the Continuous library. Double-click on it,and enter [-300, -20; 666.7, -166.7] for A, [500, ‘0 O,r -16667] for B, [0, 1] for C,and [0, 0] for D. Then enter [0; 0] for the
initial conditions. Click OK. Note that the dimension of the matrix B tells Simulink that there are two inputs. The dimensions of the matrices C and D tell Simulink that there is one output.
5. Select and place the Scope block from the Sinks library. I>
6. Once the blocks have been placed, connect the input port on each block to the . out port port on the preceding block as shown in the figure: It is important to ‘connect the top port of the Mux block (which corresponds to the first input, v(t)):to the output of the Relay block, and to connect the bottom port of the Mux block (which I  I’ corresponds to the second input, Td(t)) to the output of the disturbance step block.
7. Set the Stop time to 0.1 (which is simply an estimate of how long is needed to see the complete response), run the simulation, and examine the plot of w(t) in the Scope. you should see something like Figure 9.4-10. If you want to,examine the current i  (t), change the matrix C to [1, 0], and run the simulation again.

The results show that the relay logic control scheme keeps the speed within the desired limits of 250 and 350 before the disturbance torque starts to act..The speed oscillates because when the applied voltage is zero, the speed decreases as a result of the ‘back mf and the viscous damping. The speed drops below 250 when the disturbance torque starts to act, because the applied voltage is 0 at that time. As soon as the speed drops bCl 250, the relay controller switches the voltage to 100, but it now takes longer for the speed to increase because the motor torque must now work against the disturbance

Note that the speed becomes constant, instead of oscillating. This is because with,
v = 100, the system achieves a steady-state condition in which the motor torque equals the sum of the disturbance torque and the viscous damping torque. Thus the acceleration is zero.

One practical use of this simulation is to determine how long the speed is below the limit of 250. The simulation shows that this time is approximately 0.013 s. Other uses of the simulation include finding the period of the speed’s oscillation (about 0.013 s) and he maximum value of the disturbance torque that can be tolerated by the relay controller (it is about 3.7 N . m).