Assignment # 4 Corrosion Due Tuesday, March 4, 2014
In this assignment, the propensity for different materials to corrode will be investigated. The following
five conditions are necessary for galvanic corrosion to occur:
1)
2)
3)
4)
5)
The metal is oxidiz
112
Chapter 2
Vectors and Matrices
For a rotation b about O-z-axis, the rotation matrix is
cos b
[Rz(b)] = C -sin b
0
sin b
cos b
0
0
0S
1
Finally, for a rotation b about O-y-axis, the rotation matrix is
[Ry(b)] = C
cos b
0
sin b
0
1
0
-sin b
0 S
cos b
Th
Section 2.6
Mathematical Operations with Matrices
111
where
ai =
ai
1
atanh ai +
b
i
cosh2 ai
bim = 8iapm3 a1 +
ci =
i2 2 -1
b b
m2
ai
4
a
- tanh ai b
p3i4 cosh2 ai
and ai = ip/2. If we take only the first four terms of this system of equations, then we
h
110
Chapter 2
Vectors and Matrices
The execution of this script gives
T=
94.2857
82.8571
74.2857
74.2857
82.8571
94.2857
where the first number is the value of T1 and the last number the value of T6.
Example 2.22
Current flowing in an electrical resistor
Section 2.6
Mathematical Operations with Matrices
109
This script could also have been written compactly as
x = [8, 1, 6; 3, 5, 7; 4, 9, 2]\[7.5, 4, 12]'
Since b = Ax, we can verify that the above solution is correct by modifying the
above script as follo
108
Chapter 2
Vectors and Matrices
numerically stable when compared to the methods used for either of the following
alternative notations:
x = A^-1*b
or
x = inv(A)*b
For large matrices, these two alternative expressions execute considerably slower
than wh
Section 2.6
Mathematical Operations with Matrices
107
2.6.5 Solution of a System of Equations
Consider the following system of n equations and n unknowns xk, k = 1, 2, , n
a11x1 + a12x2 + + a1nxn = b1
a21x1 + a22x2 + + a2nxn = b2
o
an1x1 + an2x2 + + annxn
106
Chapter 2
Vectors and Matrices
which contains an error message and an inverse that has a column of zeros. The number
and operator in the second line, 1.0e+015, indicates that each number that follows is
to be multiplied by 1015. The quantity RCOND is
Section 2.6
Mathematical Operations with Matrices
105
It is important to note that 1/A Z A (-1); 1/A will cause the system to respond
with an error message. However, 1./A is a valid expression, but it is not, in general,
equal to A - 1. The inverse can al
102
Chapter 2
Vectors and Matrices
For n = 3
|A| = a11a22a33 + a12a23a31 + a13a21a32 - a13a22a31 - a11a23a32 - a12a21a33
The MATLAB expression for the determinant is
det(a)
For example, if A is defined as
A = c
1
4
3
d
2
then, the determinant of A is obta
Section 2.6
Mathematical Operations with Matrices
103
and the eigenvalue l = v2 is related to the natural frequency of the system by
vj = 1lj rad/s, j = 1, 2, 3.
The natural frequencies are obtained from the following script:
K = [50, -30, 0; -30, 70, -40
104
Chapter 2
Vectors and Matrices
We have used the sort option descend so that we can have the roots in the order that
is required: r1 r2 r3. The real diagonal form, therefore, is
11x 2 - y 2 - 4z 2
Example 2.17
Equation of a straight line determined fro
Section 2.6
Mathematical Operations with Matrices
101
1.2
1
0.8
0.6
0.4
0.2
0
0.2
0.5
0
0.5
Figure 2.6 Summation of 150 terms of a Fourier series representation of a
periodic pulse.
multiplication, we first take the transpose of k, which results in kt : (
600
Chapter 10
Control Systems
1000
800
600
Imaginary axis
400
200
0
200
400
600
800
1000
800
600
400
200
0
Real axis
200
400
600
800
Figure 10.42 Root locus of the flywheel as a function of operating speed from
0 to 20,000 rpm.
Note that the matrix T dia
598
Chapter 10
Control Systems
and
u(t) = [u1
u2
u3
u4]'
then the linearized equations can be written as
#
$
q = vPaq + k1BaCaq + k2Bau
y = Caq
where
0
0
Pa =
0
0
0
0
0
0
0
0
0
-b
0
0
b
0
1>m
0
Ba =
0
h>Jxx
0
1>m
-h>Jxx
0
1
0
Ca =
1
0
0
-h
0
h
0
1
0
1
596
Chapter 10
Control Systems
2
(t )
(t )
Step response
1.5
1
0.5
0
0.5
0
0.5
1
1.5
2
2.5
3
3.5
4
Time
Figure 10.40 Step response of the inverted pendulum. Note that the response of
the disk (broken line) initially goes the wrong way. This initial action
Section 10.5
+
Design Examples
593
Disk angle
Controller 2
-loop
+
Disk and
pendulum
Pendulum angle
Controller 1
-loop
Figure 10.38 Block diagram for the inverted pendulum control system.
pole into the left half of the complex plane. The lead pole is p
Section 10.5
Design Examples
595
It is found from the execution of this script that the closed-loop poles are approximately -4, -3 ; 11i, which, although stable, are not well damped.
Now we design the outer feedback loop for the disk position c. The outer
592
Chapter 10
Control Systems
in the command window, which then displays
0
0
6.8923
-6.8923
Thus, there are two poles at the origin and a pair on the real axis mirrored about the
imaginary axis at ;6.9 rad/s. The system is, therefore, open-loop unstable.
590
Chapter 10
Control Systems
m
r
l
J
d
Figure 10.37 Inverted pendulum on a disk.
keeping the pendulum upright. Both the angle of the disk c and the angle of the
pendulum u are measured. The equations of motion are
ml 2
mrl cos(u)
d 2c
d 2u
du
+ mrl cos(
Section 10.5
Design Examples
589
1.6
50h(t )
v(t )
Initial conditions
h(0) = 0.022 m
v(0) = 0.991 V
1.5
1.4
Vapp and h(t )
1.3
1.2
1.1
1
0.9
0.8
0.7
0
0.5
1
1.5
2
2.5
3
3.5
4
Time (s)
Figure 10.36 Response under PID control of the nonlinear magnetic suspe
588
Chapter 10
Control Systems
The values of v0 and h0 were computed from the values given.
We now use SIMULINK to generate the block diagram shown in Figure 10.35.
From the Math library, we use Sum and Gain. For Gain, we enter a gain of 2. From
the User
586
Chapter 10
Control Systems
with parameters kp and ki. The PI controller has one pole at the origin and a zero at
-ki/kp. If the zero is close to the pole relative to the locations of the other poles and
zeros of the system, then the effect of the PI c
Section 10.5
Design Examples
585
The script is as follows:
PD = tf(-1*[1, 20], [1, 50]);
rlocus(PD*MagLev);
sgrid
xlabel('Real axis')
ylabel('Imaginary axis')
Upon execution, we obtain the results shown in Figure 10.33. The plot shows that at
some low gai
584
Chapter 10
Control Systems
We assume the mass of the ball is 100 gm, the resistance of the coil is 5 , the
inductance of the coil is 40 mH, the coupling constant is 0.01 Nm2/A, and the desired
height is 2 cm. We first create the function M file MagLev