In: Electrical Engineering
How do I calculate the steady-state pitch angle for the unity step input for the above system in matlab workspace?
consider the system with the dynamic equations in the Laplace domain and the open-loop transfer function of the aircraft pitch as given below :
sA(s) = -0.213 A(s) + 46.7 Q(s) + 0.332 (s)
sQ(s) = -0.0139 A(s)-0.426Q(s) +0.0203 (s)
s(s) = 46.7 Q(s)
P(s) = (s) / (s) = 1.161s + 0.1784 / s3 + 0.738 s2 + 0.821s
For a step reference, the design criteria are the following.
From the analysis of open loop response we can see that the open loop response is unstable. In order to stabilize the system a feedback controller is needed.
The closed-loop transfer function for the above with the controller C(s) simply set equal to one can be generated using the MATLAB command feedback as shown below.
sys_cl = feedback(P_pitch,1)
sys_cl = 1.161 s + 0.1784 ---------------------------------- s^3 + 0.738 s^2 + 2.072 s + 0.1784 Continuous-time transfer function.
the corresponding step response can be generated by adding the above and following commands to your m-file. Note that the response is scaled to model the fact that the pitch angle reference is a 0.2 radian (11 degree) step. Running your m-file at the command line will produce the plot which will show the rise time, settling time and final value by clicking 'characteristics'.
step(0.2*sys_cl); ylabel('pitch angle (rad)'); title('Closed-loop Step Response');
We can transform the output back to the time domain to generate a time function for the system's response to get some insight into how the poles and zeros of the closed-loop transfer function affect the system's response. Assuming the closed-loop transfer function has the form Y(s) / R(s), the output Y(s) in the Laplace domain is calculated as follows where R(s) is a step of magnitude 0.2.
Y(s) = 1.161 s + 0.1784 / s^3 + 0.738 s^2 + 2.072 s + 0.1784 X R(s)
Y(s) = 1.161 s + 0.1784 / s^3 + 0.738 s^2 + 2.072 s + 0.1784 X 1/s
Y(s) = 1.161 s + 0.1784 / s^4 + 0.738 s^3 + 2.072 s^2 + 0.1784s
Based on the above, the denominator of our output Y(s) can be factored into a first-order term for the real pole of the transfer function, a second-order term for the complex conjugate poles of the transfer function, and a pole at the origin for the step input. Therefore, it is desired to expand Y(s) as shown below.
Y(s) = A/s + B / s+ 0.08905 + Cs+D / s^2 + 0.640s + 2.023
The specific values of the constants A, B, C, and D can be determined by hand calculation or by using the MATLAB command residue to perform the partial fraction expansion ( [r,p,k] = residue(num,den) ) . so the resulting values of A, B,C&D are 0.2, 0.0891, 0.12 & 0.087 respectively.
entering the following code in the MATLAB command window will generate the desired plot with steady state pitch angle
t = [0:0.1:70]; y = 0.2 - 0.0891*exp(-0.08905*t) - exp(-0.3255*t).*(0.12*cos(1.3816*t)+0.0320*sin(1.3816*t)); plot(t,y) xlabel('time (sec)'); ylabel('pitch angle (rad)'); title('Closed-loop Step Response');