3 Mass – 4 Spring System Control Design


part (d): MSD controller design



Download 96.76 Kb.
Page2/2
Date23.04.2018
Size96.76 Kb.
#46616
1   2
part (d): MSD controller design

The design process of the feedback controller for our 3-mass 4-spring system is shown in the Matlab script below. The resulting K matrix is:


K = [18680

2890


1723

118


-32111

-3727 ]
These values can be interpreted as multipliers on each of the state variables as they are fed back into the system via the input. Recall that these values modify the effective system matrix via (ABK), or through being multiplied by the input matrix B. This multiplication results in:


B * K =

1.0e+04 *

0 0 0 0 0 0

0 0 0 0 0 0

0 0 0 0 0 0

0.9340 0.1445 0.0862 0.0059 -1.6056 -0.1863

0 0 0 0 0 0

0 0 0 0 0 0


from which we see that the feedback gain matrix is used to modify the coupling between the 4th state variable (the velocity of the 2nd or middle mass) and all the other state variables. Looking at the original system matrix A, we see that this could be achieved by having the feedback controller connect to the 2nd and 3rd springs and dampers.
A plot showing the behavior of my 6th order MSD model (of the actual 3 mass, 4 spring system), (blue, upper line) as compared to the generic 6th order system (green, lower line) is below. This graph shows that the peak overshoot and peak time coincide almost exactly for these two systems. The rise times are also very close, while the settling time for the actual system, 3.41s, is 0.09s (or 2.6%) faster than the 3.5s settling time for the generic 6th order system.

% MSDcntlDesign.m

%

% MSD Control Design for HW 11, using the 3 mass, 4 spring continuing



% exercise from the text

%

% J Cardell, April 2017



%

% Define constants, calculated separately from problem statement, for a

% second order system with PO = 3% and ts = 3s, see pages 240-241

zeta = 0.7448; % damping ratio

wn = 1.790; % natural frequency rad/s

%% Generic Second Order System

% Define the TRANSFER FUNCTION, standard form for a 2nd order system (see

% page 238)

num = wn^2; % numerator

dem = [1 2*zeta*wn wn^2]; % denominator

% the roots of the denominator = eigenvalues

eigs = roots(dem);

% define the transfer functoin for this 2nd order system

TF2nd = tf(num, dem)

% Plot the step response of this generic 2nd order system, and use the

% Matlab figure window options to lable the performance characteristics -

% right click within the resulting figure window and select the desired

% characteristic.

step(TF2nd)

set(gca, 'FontSize', 18)

grid

%% Augemented for 6th order system



% For a 6th order system, such as the continuing exercise MSD system,

% define 4 additional eigenvalues, to be at least 10x further to the left

% in the LHP (left-half plane), of the complex plane. See page 247. Be sure

% to avoid creating repeated eigenvalues.

for i = 3:6

eigs(i) = real(eigs(1)*10 - (i-3));

end

% Define the characteristic polynomial that has these 6 eigenvalues as its



% roots, and the associated transfer function.

charPoly6 = poly(eigs);

% Note, the final term from 'poly(eigs)' is the constant in the polynomial

% expression. If the coefficients of lambda (or s) are 'ci' then the

% polynomial is c1*s^6 + c2*s^5 ... c6*s + c7. Recognize that if c7 = 0

% then this is a homogeneous equation. If c7 <> 0 then this is a

% non-homogeneous equation and c7 is in fact the forcing function - i.e.,

% it is the input. Therefore, this terms is the numerator of the transfer

% function. The denominator of a transfer function is always the

% characteristic equation, or characteristic polynomial, of the system.

%

% ALSO, see page 249 and generic characteristic polynomials defined in the



% table and discussed in the following figure.

TFsix = tf([charPoly6(7)], charPoly6)

% Plot the step response of this system as above. Also plot the step

% response of the two transfer functions, together, in order to allow

% visual comparison.

figure


step(TFsix)

set(gca, 'FontSize', 18)

grid

figure


step(TF2nd, TFsix)

set(gca, 'FontSize', 18)

grid

%% Control Law (K matrix) definition for specific MSD system of our



%'continuing exercise'

% From previous homework we have the A and B matrices. Use these with the

% 'place' command in order to find the specific values of the feedback

% matrix K that willforce our 3-mass 4-spring system to have the

% eigenvalues defined above

% Constants / Parameters

k1 = 10; % spring constant, N/m

k2 = 20; k3 = 30; k4 = 40;

c1 = 0.4; % damping coefficient, Ns/m

c2 = 0.8; c3 = 1.2; c4 = 1.6;

m1 = 1; % mass, kg

m2 = 2; m3 = 3;

A = [0 1 0 0 0 0;

-(k1+k2)/m1 -(c1+c2)/m1 k2/m1 c2/m1 0 0

0 0 0 1 0 0

k2/m2 c2/m2 -(k2+k3)/m2 -(c2+c3)/m2 k3/m2 c3/m2

0 0 0 0 0 1

0 0 k3/m3 c3/m3 -(k3+k4)/m3 -(c3+c4)/m3 ];

B = [ 0; 0; 0; 1/m2; 0; 0];

C = [ 1 0 0 0 0 0];

D = [0];

K = place(A, B, eigs)

sysCntl = ss((A-B*K), B, (C-D*K), D);

figure


hMSD6 = stepplot(sysCntl)

% Normalize responses.

setoptions(hMSD6,'Normalize','on');

set(gca, 'FontSize', 18)

grid

figure


hFinal = stepplot(sysCntl, TFsix)

setoptions(hFinal,'Normalize','on');



set(gca, 'FontSize', 18)

grid
Download 96.76 Kb.

Share with your friends:
1   2




The database is protected by copyright ©ininet.org 2024
send message

    Main page