2.5 HW5

  2.5.1 Problem 1
  2.5.2 Problem 2
  2.5.3 Problem 3
  2.5.4 Problem 4
  2.5.5 Problem 5
  2.5.6 Problem 6

2.5.1 Problem 1

   2.5.1.1 Part (a)
   2.5.1.2 Part(b)
   2.5.1.3 Part(c)
   2.5.1.4 Part(d)

pict

Solution

2.5.1.1 Part (a)

To find the steady state \(\theta (t)\), the final value theorem will be used \begin{equation} \lim _{t\rightarrow \infty }\theta \left ( t\right ) =\lim _{s\rightarrow 0}s\theta \left ( s\right ) \tag{1} \end{equation} But \begin{equation} \theta \left ( s\right ) =\Delta \delta _{e}\left ( s\right ) G_{\theta ,\delta _{e}}\left ( s\right ) \tag{2} \end{equation} Substituting (2) in (1) gives\begin{equation} \lim _{t\rightarrow \infty }\theta \left ( t\right ) =\lim _{s\rightarrow 0}s\Delta \delta _{e}\left ( s\right ) G_{\theta ,\delta _{e}}\left ( s\right ) \tag{3} \end{equation} Using the hint given, the open loop transfer function \(G_{\theta ,\delta _{e}}\)is used, which is given in (8.3,3) on page 267 in the text as\begin{equation} \boxed{ G_{\theta ,\delta _{e}}\left ( s\right ) =\frac{-\left ( 1.158s^{2}+0.3545s+0.003873\right ) }{s^{4}+0.750468s^{3}+0.935494s^{2}+9.453025\times 10^{-3}s+4.195875\times 10^{-3}} \tag{(8.3,3)} } \end{equation} Since \(\Delta \delta _{e}=5^{o}\), then \(\mathcal{L} \left ( \Delta \delta _{e}\right ) =\frac{1}{s}\Delta \delta _{e}\) and (3) becomes \begin{align*} \lim _{t\rightarrow \infty }\theta \left ( t\right ) & =\lim _{s\rightarrow 0}s\left ( \frac{1}{s}\Delta \delta _{e}\right ) \frac{-\left ( 1.158s^{2}+0.3545s+0.003873\right ) }{s^{4}+0.750468s^{3}+0.935494s^{2}+9.453025\times 10^{-3}s+4.195875\times 10^{-3}}\tag{4}\\ & =\Delta \delta _{e}\frac{-\left ( 0.003873\right ) }{4.195875\times 10^{-3}}\nonumber \\ & =5\left ( \frac{-0.003873}{4.195875\times 10^{-3}}\right )\\ & =\boxed{-4.6152^{o}} \end{align*}

2.5.1.2 Part(b)

Starting from (8.3,1) on page 266 of the textbook\begin{align*} \theta \left ( s\right ) & =\theta _{c}\left ( s\right ) \mathring{G}_{\theta ,\delta _{e}}\tag{5}\\ & =\theta _{c}\left ( s\right ) \frac{JG_{\theta ,\delta _{e}}}{1+JG_{\theta ,\delta _{e}}} \end{align*}

Since the error by definition is given by \begin{equation} e\left ( s\right ) =\theta _{c}\left ( s\right ) -\theta \left ( s\right ) \tag{6} \end{equation} Then using (6) and (5) results in \begin{align} e\left ( s\right ) & =\theta _{c}\left ( s\right ) -\theta _{c}\left ( s\right ) \frac{JG_{\theta ,\delta _{e}}}{1+JG_{\theta ,\delta _{e}}}\nonumber \\ & =\theta _{c}\left ( s\right ) \left ( 1-\frac{JG_{\theta ,\delta _{e}}}{1+JG_{\theta ,\delta _{e}}}\right ) \tag{7} \end{align}

But \(\theta _{c}(s)\) is step input, whose Laplace transform is \(\frac{1}{s}\), hence\[ e\left ( s\right ) =\frac{1}{s}\left ( \frac{JG_{\theta ,\delta _{e}}}{1+JG_{\theta ,\delta _{e}}}-1\right ) \] Since \(J=k_{2}\) then \[ e\left ( s\right ) =\frac{1}{s}\left ( 1-\frac{k_{2}G_{\theta ,\delta _{e}}}{1+k_{2}G_{\theta ,\delta _{e}}}\right ) \] Using final value theorem gives \begin{align*} \lim _{t\rightarrow \infty }e\left ( t\right ) & =\lim _{s\rightarrow 0}se\left ( s\right ) \\ & =\lim _{s\rightarrow 0}s\frac{1}{s}\left ( 1-\frac{k_{2}G_{\theta ,\delta _{e}}}{1+k_{2}G_{\theta ,\delta _{e}}}\right ) \\ & =\lim _{s\rightarrow 0}\left ( 1-\frac{k_{2}G_{\theta ,\delta _{e}}}{1+k_{2}G_{\theta ,\delta _{e}}}\right ) \\ & =\lim _{s\rightarrow 0}1-\lim _{s\rightarrow 0}\frac{k_{2}G_{\theta ,\delta _{e}}}{1+k_{2}G_{\theta ,\delta _{e}}}\\ & =1-\left ( \lim _{s\rightarrow 0}\frac{k_{2}\frac{-\left ( 1.158s^{2}+0.3545s+0.003873\right ) }{s^{4}+0.750468s^{3}+0.935494s^{2}+9.453025\times 10^{-3}s+4.195875\times 10^{-3}}}{1+k_{2}\frac{-\left ( 1.158s^{2}+0.3545s+0.003873\right ) }{s^{4}+0.750468s^{3}+0.935494s^{2}+9.453025\times 10^{-3}s+4.195875\times 10^{-3}}}\right ) \\ & =1-\frac{k_{2}\frac{-\left ( 0.003873\right ) }{4.195875\times 10^{-3}}}{1+k_{2}\frac{-\left ( 0.003873\right ) }{4.195875\times 10^{-3}}}\\ & =1-\frac{-0.923\,05k_{2}}{1-0.923\,05k_{2}}\\ & =\frac{\left ( 1-0.923\,05k_{2}\right ) +0.923\,05k_{2}}{1-0.92305k_{2}}\\ & =\frac{1}{1-0.92305k_{2}} \end{align*}

Which simplifies to\[ \boxed{\lim _{t\rightarrow \infty }e\left ( t\right )=\frac{1}{1-0.9231\,k_{2}}} \] This is a plot showing the steady state error \(e\left ( \infty \right ) \) as function of \(k_{2}\) as \(k_{2}\) is changed from \(0\) to \(-50\)

ess[k2_] := 1/(1 - 0.932305 k2);
Plot[Evaluate@ess[k2], {k2, -50, 0}, Frame -> True,
    FrameLabel -> {
    {"ess", None},
    {"k2", "steady state error as function of k2"}},
    BaseStyle -> FontSize -> 18
]

pict
Figure 2.73:Steady state error as function of \(k_2\), problem 1
2.5.1.3 Part(c)

From (7) above \[ e\left ( s\right ) =\theta _{c}\left ( s\right ) \left ( 1-\frac{JG_{\theta ,\delta _{e}}}{1+JG_{\theta ,\delta _{e}}}\right ) \] When \(\theta _{c}\left ( t\right ) =5^{0}\) then \(\theta _{c}\left ( s\right ) =\frac{5}{s}\) and using final value theorem, with requirement that \(e_{ss}<0.1\) then \[ 5\left ( \frac{1}{1-0.92305k_{2}}\right ) <0.1 \] Hence\begin{align*} 5 & < 0.1-0.092305\,k_{2}\\ 4.9 & < -0.092305\,k_{2}\\ k_{2} & < -\frac{4.9}{0.092305}\\ k_{2} & < \boxed{-53.085} \end{align*}

Hence \(k_{2}\) has to be kept below \(-53.085\) for the steady state error to be less than \(0.1^{o}\) when \(\theta _{c}\left ( s\right ) =5^{o}\)

2.5.1.4 Part(d)

From figure 8.5, in textbook

pict
Figure 2.74:Figure 8.5 from text, pitch attitude controller, problem 1
\(\delta _{e}\) is the elevator angle (output from the controller and the input to \(G_{\theta \delta _{e}}\). The controller is now \(J=k_{2}\) where \(k_{2}=-53.085\). Hence \begin{equation} \delta _{e}=e\left ( s\right ) k_{2} \tag{8} \end{equation} But \(e(s)\) is given in (7). Hence (8) becomes\[ \delta _{e}\left ( s\right ) =\theta _{c}\left ( s\right ) \left ( 1-\frac{k_{2}G_{\theta ,\delta _{e}}}{1+k_{2}G_{\theta ,\delta _{e}}}\right ) k_{2}\] Since \(\theta _{c}\left ( s\right ) =\frac{5}{s}\) and \(k_{2}=-53.085\) the above becomes\begin{equation} \delta _{e}\left ( s\right ) =-\frac{5}{s}\left ( 1-\frac{\left ( -53.085\right ) G_{\theta ,\delta _{e}}}{1-\left ( 53.085\right ) G_{\theta ,\delta _{e}}}\right ) \left ( 53.085\right ) \tag{9} \end{equation} Using initial value theorem\[ \lim _{t\rightarrow 0}\delta _{e}\left ( t\right ) =\lim _{s\rightarrow \infty }s\delta _{e}\left ( s\right ) \] Applying this to (9) gives\begin{align} \delta _{e}\left ( t=0\right ) & =-\lim _{s\rightarrow \infty }5\left ( 1-\frac{\left ( -53.085\right ) G_{\theta ,\delta _{e}}}{1-\left ( 53.085\right ) G_{\theta ,\delta _{e}}}\right ) \left ( 53.085\right ) \tag{10}\\ & =-\lim _{s\rightarrow \infty }265.\,\allowbreak 43\left ( 1-\frac{\left ( -53.085\right ) G_{\theta ,\delta _{e}}}{1-\left ( 53.085\right ) G_{\theta ,\delta _{e}}}\right ) \nonumber \end{align}

Since \(G_{\theta ,\delta _{e}}=\frac{-\left ( 1.158s^{2}+0.3545s+0.003873\right ) }{s^{4}+0.750468s^{3}+0.935494s^{2}+9.453025\times 10^{-3}s+4.195875\times 10^{-3}}\) then, by dividing numerator and denominator by \(s^{4}\) and then taking the limit, it is clear that \[ \lim _{s\rightarrow \infty }G_{\theta ,\delta _{e}}=0 \] Therefore (10) reduces to\[ \boxed{\delta _{e}(t=0) =-265.43^{o}} \]

2.5.2 Problem 2

   2.5.2.1 Part(a)
   2.5.2.2 Part(b)

pict

Solution

2.5.2.1 Part(a)

Figure 8.5 from the textbook is

pict
Figure 2.75:Figure 8.5 from text, pitch attitude controller, problem 2

We need to find transfer function \(\frac{\delta _{e}}{\theta _{c}}\). From the above diagram we see that \begin{equation} \delta _{e}\left ( s\right ) =e\left ( s\right ) J\left ( s\right ) \tag{1} \end{equation} Where \(e(s)\) was found in problem 1 above in equation (7) as\[ e\left ( s\right ) =\theta _{c}\left ( s\right ) \left ( 1-\frac{JG_{\theta ,\delta _{e}}}{1+JG_{\theta ,\delta _{e}}}\right ) \] Hence (1) becomes\begin{align} \delta _{e}\left ( s\right ) & =J\theta _{c}\left ( s\right ) \left ( 1-\frac{JG_{\theta ,\delta _{e}}}{1+JG_{\theta ,\delta _{e}}}\right ) \nonumber \\ \frac{\delta _{e}}{\theta _{c}} & =G_{\delta _{e},\theta _{c}}=J\left ( 1-\frac{JG_{\theta ,\delta _{e}}}{1+JG_{\theta ,\delta _{e}}}\right ) \nonumber \\ G_{\delta _{e},\theta _{c}} & =J\left ( \frac{1}{1+JG_{\theta ,\delta _{e}}}\right ) \nonumber \\ & =\frac{J}{1+JG_{\theta ,\delta _{e}}} \tag{2} \end{align}

Where \[ \boxed{G_{\theta ,\delta _{e}}=\frac{-\left ( 1.158s^{2}+0.3545s+0.003873\right ) }{s^{4}+0.750468s^{3}+0.935494s^{2}+9.453025\times 10^{-3}s+4.195875\times 10^{-3}} } \]

2.5.2.2 Part(b)

Using the hint, let \(J=0.5\left ( 1+s+\frac{1}{s}\right ) \) and apply the final value theorem to obtain the steady state \(\delta _{e}\left ( \infty \right ) \) when \(\theta _{c}\left ( s\right ) =\frac{1}{s}\) (step input).

Hence (2) becomes\begin{align*} \frac{\delta _{e}}{\theta _{c}} & =\frac{J}{1+JG_{\theta ,\delta _{e}}}\\ \delta _{e}\left ( s\right ) & =\left ( \frac{1}{s}\right ) \frac{0.5\left ( 1+s+\frac{1}{s}\right ) }{1+0.5\left ( 1+s+\frac{1}{s}\right ) G_{\theta ,\delta _{e}}} \end{align*}

Therefore \[ \delta _{e}\left ( \infty \right ) =\lim _{s\rightarrow 0}\frac{0.5\left ( 1+s+\frac{1}{s}\right ) }{1+0.5\left ( 1+s+\frac{1}{s}\right ) G_{\theta ,\delta _{e}}}\] To simplify the above, the numerator and denominator are multiplied by \(s\) \[ \delta _{e}\left ( \infty \right ) =\lim _{s\rightarrow 0}\frac{0.5\left ( s+s^{2}+1\right ) }{s+0.5\left ( s+s^{2}+1\right ) G_{\theta ,\delta _{e}}}\] Now the limit is taken, and noting that \(\lim _{s\rightarrow 0}G_{\theta ,\delta _{e}}=\frac{-\left ( 0.003873\right ) }{4.195875\times 10^{-3}}\) results in \begin{align*} \delta _{e}\left ( \infty \right ) & =\frac{0.5}{0.5\left ( 1\right ) \frac{-\left ( 0.003873\right ) }{4.195875\times 10^{-3}}}\\ & = \boxed{-1.0834^{o}} \end{align*}

2.5.3 Problem 3

   2.5.3.1 Part(a)
   2.5.3.2 Part(b)

pict

Solution

2.5.3.1 Part(a)

The transfer function diagram for the Yaw damper is shown on figure 8.21, page 288 in the textbook

pict
Figure 2.76:figure 8.21 from text book, yaw damper
Where \begin{equation} r\left ( s\right ) =r_{c}\left ( s\right ) \mathring{G}_{r,\delta _{r}} \tag{1} \end{equation} The closed loop \(\mathring{G}_{r,\delta _{r}}\) is \[ \mathring{G}_{r,\delta _{r}}=\frac{JG_{r,\delta _{r}}}{1+WJG_{r,\delta _{r}}}\] To obtain \(r_{ss}=r\left ( \infty \right ) \) the final value theorem is used. Here \(r_{c}\left ( s\right ) =r_{c}\frac{1}{s}\) where \(r_{c}\) on the right side is now the magnitude of the step input (per the hint given). Equation (1) becomes \begin{align*} r_{ss} & =\lim _{s\rightarrow 0}s\frac{r_{c}}{s}\mathring{G}_{r,\delta _{r}}\\ & =\lim _{s\rightarrow 0}\frac{r_{c}JG_{r,\delta _{r}}}{1+WJG_{r,\delta _{r}}} \end{align*}

Using \(W=\frac{s}{s+a}\) the above becomes\begin{align*} r_{ss} & =\lim _{s\rightarrow 0}\frac{r_{c}JG_{r,\delta _{r}}}{1+\frac{s}{s+a}JG_{r,\delta _{r}}}\\ & =r_{c}J\left ( 0\right ) G_{r,\delta _{r}}\left ( 0\right ) \end{align*}

Since \(\lim _{s\rightarrow 0}\frac{s}{s+a}=0\) then the above reduces to\[ \boxed{r_{ss}=r_{c}J\left ( 0\right ) G_{r,\delta _{r}}\left ( 0\right )} \] Since the expression for \(r_{ss}\) does not contain the time constant \(\frac{1}{a}\) in it, (it does not contain \(a\) at all), therefore \(r_{ss}\) does not depend on the time constant of the washout filter.

2.5.3.2 Part(b)

Putting the washout filter in the forward path instead of in feedback, then

\[ \mathring{G}_{r,\delta _{r}}=\frac{WJG_{r,\delta _{r}}}{1+WJG_{r,\delta _{r}}}\] Following what was done in part (a), to obtain \(r_{ss}=r\left ( \infty \right ) \) the final value theorem is used. Here \(r_{c}\left ( s\right ) =r_{c}\frac{1}{s}\) where \(r_{c}\) on the right side is the magnitude of the step input (per hint above). Equation (1) becomes \begin{align*} r_{ss} & =\lim _{s\rightarrow 0}s\frac{r_{c}}{s}\mathring{G}_{r,\delta _{r}}\\ & =\lim _{s\rightarrow 0}\frac{r_{c}WJG_{r,\delta _{r}}}{1+WJG_{r,\delta _{r}}} \end{align*}

Using \(W=\frac{s}{s+a}\) the above becomes\[ r_{ss}=\lim _{s\rightarrow 0}\frac{r_{c}\frac{s}{s+a}JG_{r,\delta _{r}}}{1+\frac{s}{s+a}JG_{r,\delta _{r}}}\] Since \(\lim _{s\rightarrow 0}\frac{s}{s+a}=0\) then the above becomes\begin{align*} r_{ss} & =\frac{0}{1+0}\\ & =0 \end{align*}

Hence \[ \lim _{t\rightarrow \infty }r_{c}\left ( t\right ) =0 \] Regardless of what \(a\) is.

2.5.4 Problem 4

   2.5.4.1 Part(a)
   2.5.4.2 Part(b)

pict

pict
Figure 2.77:Roll control system, nonaugmented, problem 4
2.5.4.1 Part(a)

We need to obtain \(\mathring{G}_{\delta _{a}\phi _{c}}\). From the above diagram we see that \begin{align*} \delta _{a} & =e_{p}J_{a}\\ & =\left ( p_{c}-p\right ) J_{a} \end{align*}

But \(p_{c}=e_{\phi }J_{p}=\left ( \phi _{c}-\phi \right ) J_{p}\), hence the above becomes \[ \delta _{a}=\left ( \left ( \phi _{c}-\phi \right ) J_{p}-p\right ) J_{a}\] Since \(p=G_{p\delta _{r}}\delta r+G_{p\delta _{a}}\delta a\), the above becomes \[ \delta _{a}=\left ( \left ( \phi _{c}-\phi \right ) J_{p}-\left ( G_{p\delta _{r}}\delta r+G_{p\delta _{a}}\delta _{a}\right ) \right ) J_{a}\] From lecture 5/1/2014 in class, \(\delta r=B\delta _{a}\) where \(B=\frac{-WJ_{r}G_{r\delta a}}{1+WJ_{r}G_{r\delta r}}\). Therefore \[ \delta _{a}=\left ( \left ( \phi _{c}-\phi \right ) J_{p}-\left ( G_{p\delta _{r}}B\delta _{a}+G_{p\delta _{a}}\delta _{a}\right ) \right ) J_{a}\] Also from lecture 5/1/2014 in class, \(\phi =\phi _{c}\mathring{G}_{\phi \phi _{c}}\), and the above reduces to \begin{align*} \delta _{a} & =\left ( \left ( \phi _{c}-\phi _{c}\mathring{G}_{\phi \phi _{c}}\right ) J_{p}-\left ( G_{p\delta _{r}}B\delta _{a}+G_{p\delta _{a}}\delta _{a}\right ) \right ) J_{a}\\ & =\phi _{c}J_{p}-\phi _{c}\mathring{G}_{\phi \phi _{c}}J_{p}-G_{p\delta _{r}}B\delta _{a}J_{a}-G_{p\delta _{a}}\delta _{a}J_{a}\\ \delta _{a}\left ( 1+G_{p\delta _{r}}BJ_{a}+G_{p\delta _{a}}J_{a}\right ) & =\phi _{c}\left ( J_{p}\left ( 1-\mathring{G}_{\phi \phi _{c}}\right ) \right ) \end{align*}

Therefore\[ \mathring{G}_{\delta _{a}\phi _{c}}=\frac{\delta _{a}}{\phi _{c}}=\frac{J_{p}\left ( 1-\mathring{G}_{\phi \phi _{c}}\right ) }{1+G_{p\delta _{r}}BJ_{a}+G_{p\delta _{a}}J_{a}}\]

2.5.4.2 Part(b)

From the diagram above \[ v=G_{v\delta _{r}}\delta r+G_{v\delta _{a}}\delta _{a}\] But \(\delta r=B\delta _{a}\) where \(B=\frac{-WJ_{r}G_{r\delta a}}{1+WJ_{r}G_{r\delta r}}\) hence \begin{align*} v & =G_{v\delta _{r}}B\delta a+G_{v\delta _{a}}\delta _{a}\\ & =\left ( G_{v\delta _{r}}B+G_{v\delta _{a}}\right ) \delta _{a} \end{align*}

From part (a), we found \(\delta _{a}=\phi _{c}\mathring{G}_{\delta _{a}\phi _{c}}\), where \(\mathring{G}_{\delta _{a}\phi _{c}}=\) \(\frac{J_{p}\left ( 1-\mathring{G}_{\phi \phi _{c}}\right ) }{1+G_{p\delta _{r}}BJ_{a}+G_{p\delta _{a}}J_{a}}\). The above becomes\[ v=\left ( G_{v\delta _{r}}B+G_{v\delta _{a}}\right ) \phi _{c}\mathring{G}_{\delta _{a}\phi _{c}}\] Therefore \[ \mathring{G}_{v\phi _{c}}=\frac{v}{\phi _{c}}=\left ( G_{v\delta _{r}}B+G_{v\delta _{a}}\right ) \mathring{G}_{\delta _{a}\phi _{c}}\]

2.5.5 Problem 5

   2.5.5.1 Generating the augmented system
   2.5.5.2 A,B,C,D generated by Matlab
   2.5.5.3 Generating the responses
   2.5.5.4 Response for one radian impulse in \(\psi _{c}\)
   2.5.5.5 Response for one degree per second impulse in \(r_{c}\)
   2.5.5.6 Response for 15 degrees step input in \(\psi _{c}\)
   2.5.5.7 Response for one degree per second step input in \(r_{c}\)
   2.5.5.8 Conclusion
   2.5.5.9 Source code listing

pict
Figure 2.78:problem 5 description

Solution:

2.5.5.1 Generating the augmented system

From class notes on may 1, 2014, the following was derived

\[ \left \{ \dot{z}\right \} =\mathbf{P}\left \{ z\right \} \mathbf{+}\left \{ Q\right \} \phi _{c}\] Where for \(\theta _{0}=0\)\[ \begin{bmatrix} \dot{v}\\ \dot{p}\\ \dot{r}\\ \dot{\phi }\\ \dot{\delta }_{a}\\ \dot{\delta }_{r}\\ \dot{y}\end{bmatrix} =\begin{bmatrix} a_{11} & a_{12} & a_{13} & g & b_{11} & b_{12} & 0\\ a_{21} & a_{22} & a_{23} & 0 & b_{21} & b_{22} & 0\\ a_{31} & a_{32} & a_{33} & 0 & b_{31} & b_{32} & 0\\ 0 & 1 & 0 & 0 & 0 & 0 & 0\\ 0 & -\frac{k_{a}}{\tau _{a}} & 0 & -\frac{k_{a}k_{p}}{\tau _{a}} & -\frac{1}{\tau _{a}} & 0 & 0\\ 0 & 0 & 0 & 0 & 0 & 0 & 1\\ \frac{k_{r}}{\tau _{r}}a_{31} & \frac{k_{r}}{\tau _{r}}a_{32} & \frac{k_{r}}{\tau _{r}}a_{33} & 0 & \frac{k_{r}}{\tau _{r}}b_{31} & \left ( \frac{k_{r}b_{32}}{\tau _{r}}-\frac{1}{\tau _{r}\tau _{w0}}\right ) & -\left ( \frac{1}{\tau _{r}}+\frac{1}{\tau _{w0}}\right ) \end{bmatrix}\begin{bmatrix} v\\ p\\ r\\ \phi \\ \delta _{a}\\ \delta _{r}\\ y \end{bmatrix} +\begin{bmatrix} 0\\ 0\\ 0\\ 0\\ \frac{k_{a}k_{p}}{\tau _{a}}\\ 0\\ 0 \end{bmatrix} \phi _{c}\] The values for \(a_{ij}\) in the above are those from lateral equations of motion equation 4.9,19 on page 111 in the textbook

pict
Figure 2.79:Details of \(A\) matrix from \(x'(t)=A x(t)+ B u(t)\) for problem 5

And the \(b_{ij}\) are from the \(B\) matrix (\(4\times 2\)) from equation 7.9,3 on page 244

pict
Figure 2.80:Details of \(B\) matrix from \(x'(t)=A x(t)+ B u(t)\) for problem 5
We are now ready to augment the above system. Since \(e_{\psi }=\psi _{c}-\psi \) and \(e_{\psi }\,k=\phi _{c}\) where \(k\) is the gain shown in the above diagram feeding to \(\phi _{c}\), then \begin{equation} \phi _{c}=k\left ( \psi _{c}-\psi \right ) \tag{1} \end{equation} Equation (3) in the notes from 5/1/2014, needs to be modified. It was\begin{equation} \dot{\delta }_{a}=-\frac{k_{a}k_{p}}{\tau _{a}}\phi -\frac{k_{a}}{\tau _{a}}p-\frac{\delta _{a}}{\tau _{a}}+\frac{k_{a}k_{p}}{\tau _{a}}\phi _{c} \tag{3} \end{equation} Using (1) and (3) results in \begin{align*} \dot{\delta }_{a} & =-\frac{k_{a}k_{p}}{\tau _{a}}\phi -\frac{k_{a}}{\tau _{a}}p-\frac{\delta _{a}}{\tau _{a}}+\frac{k_{a}k_{p}}{\tau _{a}}k\left ( \psi _{c}-\psi \right ) \\ & =-\frac{k_{a}k_{p}}{\tau _{a}}\phi -\frac{k_{a}}{\tau _{a}}p-\frac{\delta _{a}}{\tau _{a}}-\frac{k_{a}k_{p}}{\tau _{a}}k\psi +\frac{k_{a}k_{p}}{\tau _{a}}k\psi _{c} \end{align*}

Given that \(\dot{\psi }=r\sec \theta _{0}=r\) since \(\theta _{0}=0\). In Laplace domain this results in \(\psi \left ( s\right ) =\frac{1}{s}r\) The new augmented system becomes\[\begin{bmatrix} \dot{v}\\ \dot{p}\\ \dot{r}\\ \dot{\phi }\\ \dot{\psi }\\ \dot{\delta }_{a}\\ \dot{\delta }_{r}\\ \dot{y}\end{bmatrix} =\begin{bmatrix} a_{11} & a_{12} & a_{13} & g & 0 & b_{11} & b_{12} & 0\\ a_{21} & a_{22} & a_{23} & 0 & 0 & b_{21} & b_{22} & 0\\ a_{31} & a_{32} & a_{33} & 0 & 0 & b_{31} & b_{32} & 0\\ 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\ 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0\\ 0 & -\frac{k_{a}}{\tau _{a}} & 0 & -\frac{k_{a}k_{p}}{\tau _{a}} & -\frac{k_{a}k_{p}}{\tau _{a}}k & -\frac{1}{\tau _{a}} & 0 & 0\\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1\\ \frac{k_{r}}{\tau _{r}}a_{31} & \frac{k_{r}}{\tau _{r}}a_{32} & \frac{k_{r}}{\tau _{r}}a_{33} & 0 & 0 & \frac{k_{r}}{\tau _{r}}b_{31} & \left ( \frac{k_{r}b_{32}}{\tau _{r}}-\frac{1}{\tau _{r}\tau _{wo}}\right ) & -\left ( \frac{1}{\tau _{r}}+\frac{1}{\tau _{wo}}\right ) \end{bmatrix}\begin{bmatrix} v\\ p\\ r\\ \phi \\ \psi \\ \delta _{a}\\ \delta _{r}\\ y \end{bmatrix} +\begin{bmatrix} 0\\ 0\\ 0\\ 0\\ 0\\ \frac{k_{a}k_{p}}{\tau _{a}}k\\ 0\\ 0 \end{bmatrix} \psi _{c}\] The above is the new system \(\left \{ \dot{z}\right \} =\mathbf{P}\left \{ z\right \} \mathbf{+}\left \{ Q\right \} \phi _{c}\) where \(\mathbf{P}\) now is an \(8\times 8\) matrix and \(Q\) is an \(8\times 1\) vector. A new state \(\psi \) was added and the input now is \(\psi _{c}\) instead of \(\phi _{c}\). The closed loop transfer function is \[ \boxed{\mathbf{\mathring{G}=}\left [ s\mathbf{I}-\mathbf{P}\right ] ^{-1}Q} \] For the controller, the following values will be used \(k=2.5\) and \(W\left ( s\right ) =\frac{s}{s+\frac{1}{\tau _{wo}}}\), where \(\tau _{wo}=4\), and \(J_{r}\left (s\right ) =\frac{k_{r}\frac{1}{\tau _{r}}}{s+\frac{1}{\tau _{r}}}\) where \(k_{r}=-1.6\) and \(\tau _{r}=0.3\), hence \(J_{r}\left ( s\right ) =\frac{\left (1/0.3\right ) 1.6}{s+\left ( 1/0.3\right ) }\) and \(J_{p}\left ( s\right )=k_{p}=1.5\) and \(J_{a}=\frac{k_{a}\frac{1}{\tau _{a}}}{s+\frac{1}{\tau _{a}}}\) where \(k_{a}=-1\) and \(\tau _{a}=0.15\). Hence \(J_{a}=\frac{\frac{-1}{0.15} }{s+\frac{1}{0.15}}\). To summarize\begin{align*} k & =2.5\\ W\left ( s\right ) & =\frac{s}{s+\frac{1}{4}}\\ J_{r}\left ( s\right ) & =\frac{-\left ( 1/0.3\right ) 1.6}{s+\left ( 1/0.3\right ) }=\frac{-5.3333}{s+3.3333}\\ J_{a} & =\frac{-\frac{1}{0.15}}{s+\frac{1}{0.15}}\frac{-6.6667}{s+6.6667} \end{align*}

Now that all the controllers are known and the new augmented system is shown above, Matlab was used to obtain the response due to an impulse and step in the new input \(\psi _{c}\). The structure of \(A,B,C\) and \(D\) matrices is as follows

pict
Figure 2.81:State space matrices dimensions

And the augmented roll controller becomes

pict
Figure 2.82:Roll control system, augmented, problem 5
2.5.5.2 A,B,C,D generated by Matlab

These are the numerical value of the matrices A,B,C,D generated by Matlab after connecting the system

sys=connect(sysa,Q,inputs,outputs)
a=sys.A
b=sys.B
c=sys.C
d=sys.D

a =
   -6.6667         0         0   -1.0000         0   -1.5000         0   -3.7500
         0   -3.3333         0         0   -1.0000         0    0.2500         0
         0  -30.0907   -0.0558         0 -774.0000   32.2000         0         0
    0.9540   -0.6101   -0.0039   -0.4342    0.4136         0         0         0
   -0.0249    2.5915    0.0011   -0.0061   -0.1458         0         0         0
         0         0         0    1.0000         0         0         0         0
         0         0         0         0    1.0000         0   -0.2500         0
         0         0         0         0    1.0000         0         0         0

b =
    3.7500         0
         0    1.0000
         0         0
         0         0
         0         0
         0         0
         0         0
         0         0

c =
   -6.6667         0         0         0         0         0         0         0
         0   -5.3333         0         0         0         0         0         0
         0         0    1.0000         0         0         0         0         0
         0         0         0    1.0000         0         0         0         0
         0         0         0         0    1.0000         0         0         0
         0         0         0         0         0    1.0000         0         0
         0         0         0         0         0         0         0    1.0000
d =
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0
     0     0

2.5.5.3 Generating the responses

Four different inputs are used, and for each input, seven outputs were plotted.

The inputs are: \(15^{0}\) step input in \(\psi _{c}\) and one radian angle impulse in \(\psi _{c}\). For each of these two inputs the responses \(\beta ,p,r,\phi ,\psi ,\delta _{a},\delta _{r}\) were plotted.

Next, a step input \(r_{c}\) of amplitude \(1^{o}\) per second, and an impulse \(r_{c}\) of \(1^{o}\) per second are used, and for each of these inputs, the responses \(\beta ,p,r,\phi ,\psi ,\delta _{a},\delta _{r}\) were plotted.

There are 28 different plots generated. Special attention is given to the response \(\psi \) to the \(15^{o}\) step input \(\psi _{c}\) and to the response \(r\) to the \(1^{o}\) per second step input \(r_{c}\).

Final conclusion is given below at the end after showing the responses obtained.

2.5.5.4 Response for one radian impulse in \(\psi _{c}\)

All variables subside to negligible level, including \(\psi \) which had a residual value in the non-augmented system when \(\phi _c\) was used as input instead of \(\psi _c\) here.

All state variables had good damped oscillatory decay as well. The aileron angle was larger than the case with the non-augmented system, reaching almost 50 degrees before damping down. The rudder angle went to 2 degrees which is twice as much as with the non-augmented system in the text book at page 293. Variables decay to negligible level in about 15 seconds, similar to the non-augmented system, except for \(\psi \) which needed about 30 seconds.

pict

Figure 2.83:Impulse response. Input \(\psi _c\), output \(\delta _a\)
pict
Figure 2.84:Impulse response. Input \(\psi _c\), output \(\delta _r\)

pict

Figure 2.85:Impulse response. Input \(\psi _c\), output \(\beta \)
pict
Figure 2.86:Impulse response. Input \(\psi _c\), output p

pict

Figure 2.87:Impulse response. Input \(\psi _c\) output \(\phi \)
pict
Figure 2.88:Impulse response. Input \(\psi _c\), output r

pict
Figure 2.89:Impulse response. Input \(\psi _{c}\), output \(\psi \)
2.5.5.5 Response for one degree per second impulse in \(r_{c}\)

All variables here also subsided to negligible level in about 15 seconds, except for \(\phi \) and \(\psi \) which needed 40 seconds.

All state variables had good damped oscillatory decay as well. The aileron angle reached only 5 degrees before damping down.

pict

Figure 2.90:Impulse response. Input \(r_c\), output \(\delta _a\)
pict
Figure 2.91:Impulse response. Input \(rc_c\), output \(\delta _r\)

pict

Figure 2.92:Impulse response. Input \(rc_c\), output \(\beta \)
pict
Figure 2.93:Impulse response. Input \(rc_c\), output p

pict

Figure 2.94:Impulse response. Input \(rc_c\) output \(\phi \)
pict
Figure 2.95:Impulse response. Input \(rc_c\), output \(\psi \)

pict
Figure 2.96:Impulse response. Input \(rc_{c}\), output r
2.5.5.6 Response for 15 degrees step input in \(\psi _{c}\)

Aileron angle took 40 seconds to damped to zero and had large initial oscillation (-50 degrees). Rudder angle reached \(1.2\) degrees before damping.

The yaw rate \(r\) did not residual value as the case was with the non-augmented system when roll command was used as can be seen in figure 8.28, page 294 in the text. Here we see \(r\) damping down to almost zero in 40 seconds.

pict

Figure 2.97:Step response. Input \(\psi _c\), output \(\delta _a\)
pict
Figure 2.98:Step response. Input \(\psi _c\), output \(\delta _r\)

pict

Figure 2.99:Step response. Input \(\psi _c\), output \(\beta \)
pict
Figure 2.100:Step response. Input \(\psi _c\), output p

pict

Figure 2.101:Step response. Input \(\psi _c\) output \(\phi \)
pict
Figure 2.102:Step response. Input \(\psi _c\), output r

pict
Figure 2.103:Step response. Input \(\psi _{c}\), output \(\psi \)
2.5.5.7 Response for one degree per second step input in \(r_{c}\)

Aileron angle reach 20 degrees steady state, while rudder was -1.6 degrees when the reference command is set to one degree per second yaw rate \(r_c\).

Rudder angle had more oscillation than aileron but both reached steady state in 40 seconds. The roll rate \(p\) damped to zero in 40 seconds.

State variable yaw rate \(r\) did not track \(r_c\) in this case. The augmented system could not control Yaw rate as it did not follow the step input \(r_c\) as is discussed more below.

pict

Figure 2.104:Step response. Input \(r_c\), output \(\delta _a\)
pict
Figure 2.105:Step response. Input \(r_c\), output \(\delta _r\)

pict

Figure 2.106:Step response. Input \(r_c\), output \(\beta \)
pict
Figure 2.107:Step response. Input \(r_c\), output p

pict

Figure 2.108:Step response. Input \(r_c\) output \(\phi \)
pict
Figure 2.109:Step response. Input \(r_c\), output \(\psi \)

pict
Figure 2.110:Step response. Input \(r_{c}\), output r
2.5.5.8 Conclusion

Looking at the \(\psi \) step response of \(15^{o}\) in \(\psi _{c}\) given in figure 2.103, we can see that the response \(\psi \) was good to the step input. After 30 seconds, it had amplitude of 16 degrees, and at 40 seconds it was close to the 15 degrees reference input. There was no oscillation and almost no overshoot (about 1 degree overshoot).

However, Looking at the \(r\) step response of \(1^{o}\) per second in \(r_{c}\) given in figure 2.110, the \(r\) step response was not as good as the case was when using the nonaugmented system.

There was similar oscillation initially in the response \(r\), but after 10 seconds, the response failed to reach one degree per second, and it actually went to zero instead, as can be seen in the following figure.

This shows the augmented system is not suitable for controlling \(r\).

pict
Figure 2.111:Showing augmented system is not suitable to tracking \(r_c\)
2.5.5.9 Source code listing

2.5.6 Problem 6

   2.5.6.1 Pitch attitude controller
   2.5.6.2 Speed controller
   2.5.6.3 Generating figure 8.12, speed response
   2.5.6.4 Figure 8.13, \(\gamma \) response
   2.5.6.5 Figure 8.14
   2.5.6.6 Figure 8.15

pict

Solution:

2.5.6.1 Pitch attitude controller

The following diagram illustrates the system that we need to implement in simulink. It is figure 8.5 in the text, page 266, which is a pitch attitude controller.

pict
Figure 2.112:pitch attitude controller for problem 6, showing the three type of controllers to implement in simulink
The three different controllers are implemented in simulink. A scope was used to show the responses in order to reproduce figure 8.7 in the textbook (page 268). These are the resulting plots showing the simulink model used for each.

pict
Figure 2.113:producing figure 8.7(a) for problem 6

pict
Figure 2.114:producing figure 8.7(b) for problem 6

pict
Figure 2.115:producing figure 8.7(c) for problem 6
2.5.6.2 Speed controller

For this part, the speed controller given by figure 8.8, page 270 is implemented in simulink.

pict
Figure 2.116:figure 8.8, speed controller for problem 6

Using the exact equations, the aircraft \(A,B,C,D\) state space matrices are defined in the Matlab workspace before starting simulink. This was done since a state space control block was used for the aircraft model directly in simulink instead of using transfer functions. This lead to a much simpler model in simulink. The matrices \(A,B,C,D\) longitudinal motion are the following

A=[-0.006868   0.01395     0        -32.20;
   -0.09055   -0.3151      773.98    0.0;
   0.0001187  -0.001026   -0.4285    0.0;
   0.0         0.0         1         0.0];

B=[-0.000187 9.66;-17.85 0;-1.158 0; 0 0]

 C=[1 0 0 0;
   0 1 0 0;
   0 0 1 0;
   0 0 0 1]

D=[0 0;
   0 0;
   0 0;
   0 0]
2.5.6.3 Generating figure 8.12, speed response

Figure 8.12 was reproduced using controller \(J=0.005 (3s+1)\) which was implemented using PID block. \(\delta _{p}=\frac{-1}{6}\) was implemented using step input with amplitude of \(\frac{-1}{6}\). The following shows the resulting plot with the model used.

pict
Figure 2.117:producing figure 8.12, speed controller for problem 6
2.5.6.4 Figure 8.13, \(\gamma \) response

To reproduce figure 8.13, we first note that \(\gamma =\theta -\alpha \) where \(\alpha \) is the angle of attack found from \(\alpha =\frac{w}{u_{0}}\) where \(u_{0}=774\) fps (the cruise speed). Therefore, the model was adjusted to find \(\gamma \) according to the above. Here is the simulink model and the figure reproduced.

pict
Figure 2.118:producing figure 8.13, speed controller for problem 6
2.5.6.5 Figure 8.14

To produce this figure, a scope as added after the controller to capture the value of the elevator angle \(\delta _e\) feeding into the aircraft as input. The \(y\) axes scale was changed to have units of degrees instead of radians by using a gain block with gain \(\frac{180}{\pi }\). Here is the result.

pict
Figure 2.119:producing figure 8.14, speed controller for problem 6
2.5.6.6 Figure 8.15

To produce this figure, which shows the resulting angle of attack, a scope as added after \(\alpha \) was calculated using \(\alpha =\frac{w}{u_0}\). Here is the result.

pict
Figure 2.120:producing figure 8.15, speed controller for problem 6