Skip to Main Content Skip to Search
Home |   Select Country  Choose Country  |  Contact Us  |  Cart Store 
Create Account | Log In
Products & Services Industries Academia Support User Community Company

 

Student Center

Solution: Analyze the behavior of a simplified satellite attitude control system


Figure 1
Figure 1: Communication Satellite  

Figure 2: Attitude Control Block Diagram
Figure 2: Attitude Control Block Diagram

1. Determine the satellite's closed-loop transfer function with various system controllers

(General Closed-Loop Transfer Function Equation)

- When D(s) is a proportional gain
% Assume K = 5
% Note: There are a couple of techniques that you can use to solve this question.

%Technique One (using the ZPK function) %Technique Two (using the TF function)

K = 5;
z = []; % plant zeros
p = [0 0]; % plant poles
sys = zpk(z,p,K);
sys1 = 0.1*sys;
sysout1 = feedback(sys1,1);

Answer:

Zero/pole/gain:
0.5
------------
(s^2 + 0.5)


K = 5;
num1 = [1]; % numerator of plant
den1 = [10 0 0]; % denominator of plant
sysTF1 = tf(num1,den1);
sysTF2 = K*sysTF1;
sysout1 = feedback(sysTF2,1);

Answer:

Transfer function:
5
-------------
10 s^2 + 5


- When D(s) is a PID controller
% Assume K = 25
K = 25;
zpid = [-0.5 -0.5];
ppid = [0];
syss = zpk(zpid,ppid,K);
sysg = tf(1,[10 0 0]);
sysss = series(syss,sysg);
sysout2 = feedback(sysss,1);

Answer:

Zero/pole/gain:
2.5 (s+0.5)^2
----------------------------------
(s+0.3622) (s^2 + 2.138s + 1.726)

- When D(s) is a lead-lag compensator
% Assume K = 25
K = 25;
zll = [-0.1];
pll = [-0.7];
sysserie1 = zpk(zll,pll,K);
systf = tf(1,[10 0 0]);
sysserie2 = series(sysserie1,systf);
sysout3 = feedback(sysserie2,1);

Answer:

Zero/pole/gain:
2.5 (s+0.1)
-----------------------------------
(s+0.1025) (s^2 + 0.5975s + 2.439)

2. Find the poles and zeros, plot them, and determine whether the system is stable
- When D(s) is a PID Controller
K = 25;
numpid = [4 4 1];
denpid = [4 0];
sys = tf(numpid,denpid);
syss = K*sys;
sysg = tf(1,[10 0 0]);
sysss = series(syss,sysg);
sysout2 = feedback(sysss,1);

% To find the poles and zeros of the TF
numfd = [100 100 25];
denfd = [40 100 100 25];
[zeros poles kgain] = tf2zp(numfd,denfd);

Answer:

zeros =
 -0.5000
 -0.5000 poles =
 -1.0689 + 0.7637i
 -1.0689 - 0.7637i
 -0.3622


% Plot the poles and zeros in the s-plane
pzmap(poles,zeros);
axis([-1.4 0.5 -1 1]);

Answer:

figure 1

% Is the system stable?
The system is stable because all the poles are in the left-half plane of the s-plane.
3. Plot the system step response and find: Rise Time (tr), Settling Time (ts), Percent Overshoot (Mp)
- When D(s) is a lead-lag Compensator
K = 25;
numd = [1 0.1];
dend = [1 0.7];
sysd = tf(numd,dend);
sysserie1 = K*sysd;
systf = tf(1,[10 0 0]);
sysserie2 = series(sysserie1,systf);
sysout3 = feedback(sysserie2,1);

% plot the system step response
step(sysout3);

Answer:

figure 2

Mp = 57.6772 (percent overshoot)

tr = 0.7550 sec (rise time)

ts = 11.2947 sec (settling time)

4. Plot the root locus and determine the gain value with pole values at: -1.4±0.4i
- when D(s) is a PID Controller
K = 25;
numpid = [4 4 1];
denpid = [4 0];
sys = tf(numpid,denpid);
syss = K*sys;
sysg = tf(1,[10 0 0]);
sysss = series(syss,sysg);
sysout2 = feedback(sysss,1);
rlocus(sysout2);

Answer:

figure 3

(You can use either RLOCFIND or the RLOCUS mouse tracing to find the specified gain value) Gain = 0.27 with poles at -1.4±0.4i

5. Plot the Bode and Nyquist as another means of determining system stability
- when D(s) is a lead-lag Compensator
K = 25;
numd = [1 0.1];
dend = [1 0.7];
sysd = tf(numd,dend);
sysserie1 = K*sysd;
systf = tf(1,[10 0 0]);
sysserie2 = series(sysserie1,systf);
sysout3 = feedback(sysserie2,1);

% get numerator and denominator values from the closed-loop transfer function
numllc = [25 2.5]; denllc = [10 7 25 2.5];
bode(numllc,denllc); figure;
nyquist(numllc,denllc);

Answer:

figure 4i

figure 4ii

There is a positive phase margin from the Bode plot, approximately 31 degrees, and the gain margin is infinity. Therefore, the system is considered stable.

There are no clockwise encirclements of -1 (N) in the Nyquist plot and no unstable poles (P) of G(s). Therefore, from the Nyquist Criterion (Z = N - P) Z = 0 and so the system is stable.  

Contact sales
Software evaluation for instructors
Free technical kit
E-mail this page

MATLAB & Simulink Student Version

Includes full-featured versions of both MATLAB and Simulink

From School To Industry

"The only limit to MATLAB is your imagination."
Carl Klopstein
Radar Systems Engineer

Free Code for LEGO MINDSTORMS NXT

LEGO® MINDSTORMS® NXT robotics invention system lets you create and control robots using programmable motors and sensors