and HW9 combinedand HW9 combinedand HW9 combined and HW9 combined
Date due and handed in April 29,2010
Let \(E\left ( s\right ) \) be the Laplace transform of the error signal, then we write\begin{align} E\left ( s\right ) & =u\left ( s\right ) +g\ y\left ( s\right ) \tag{1}\\ y\left ( s\right ) & =E\left ( s\right ) G\left ( s\right ) \tag{2} \end{align}
Substitute (1) into (2)\begin{align*} y\left ( s\right ) & =\left ( u\left ( s\right ) +gy\left ( s\right ) \right ) G\left ( s\right ) \\ & =u\left ( s\right ) G\left ( s\right ) +gy\left ( s\right ) G\left ( s\right ) \\ y\left ( s\right ) \left [ 1-gG\left ( s\right ) \right ] & =u\left ( s\right ) G\left ( s\right ) \\ H\left ( s\right ) & =\frac{y\left ( s\right ) }{u\left ( s\right ) }=\frac{G\left ( s\right ) }{1-gG\left ( s\right ) } \end{align*}
But \(G\left ( s\right ) =\frac{1}{\left ( s-1\right ) \left ( s+3\right ) }\), hence the above becomes\[ H\left ( s\right ) =\frac{1}{\left ( s-1\right ) \left ( s+3\right ) -g}\] Pole of \(H\left ( s\right ) \) is when denominator is zero. When \(g=0\), then the poles are \(s=1\) and \(s=-3\). Since one of poles is in the RHS plane (pole \(s=1\)), then the system is unstable when \(g=0\).
In other words, system stability is determined by the plant stability itself. Since the plant itself is unstable, then the overall system is unstable.
We found from the above what \(H\left ( s\right ) \) is.\[ H\left ( s\right ) =\frac{1}{\left ( s-1\right ) \left ( s+3\right ) -g}=\frac{1}{s^{2}+2s-\left ( 3+g\right ) }\] The roots of the denominator of \(H\left ( s\right ) \) are\[ s_{1,2}=\frac{-b}{2}\pm \frac{1}{2}\sqrt{b^{2}-4ac}=-1\pm \frac{1}{2}\sqrt{4+4\left ( 3+g\right ) }=-1\pm \sqrt{4+g}\] Hence\[ s_{1}=-1+\sqrt{4+g}\]\[ s_{2}=-1-\sqrt{4+g}\] For \(s_{1}\) to be stable, then \(\sqrt{4+g}<1\) or \(4+g<1\) or \(g<-3\). For \(s_{2},\) it is always stable for any value of \(g\).
When using negative feedback, the overall system transfer function will come out to be\[ H\left ( s\right ) =\frac{1}{\left ( s-1\right ) \left ( s+3\right ) +g}=\frac{1}{s^{2}+2s+\left ( g-3\right ) }\] Hence the roots of the denominator of \(H\left ( s\right ) \) are\[ s_{1,2}=\frac{-b}{2}\pm \frac{1}{2}\sqrt{b^{2}-4ac}=-1\pm \frac{1}{2}\sqrt{4-4\left ( g-3\right ) }=-1\pm \sqrt{4-g}\] Hence\[ s_{1}=-1+\sqrt{4-g}\]\[ s_{2}=-1-\sqrt{4-g}\] For \(s_{1}\) to be stable, then \(\sqrt{4-g}<1\) or \(4-g<1\) or \(g>3\). For \(s_{2},\) it is always stable for any value of \(g\).
Conclusion: For positive feedback, system is stable for \(g<-3\) and for negative feedback, system is stable for \(g>3\)
Solve the following difference equation\begin{equation} y\left ( k+2\right ) +y\left ( k\right ) =\sin k\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ k\geq 0\tag{1} \end{equation} \(L_{A}=\left ( 1-e^{j}S^{-1}\right ) \left ( 1-e^{-j}S^{-1}\right ) \), hence\begin{align*} L_{A}\left [ S^{2}+1\right ] y\left ( k\right ) & =0\\ \left ( 1-e^{j}S^{-1}\right ) \left ( 1-e^{-j}S^{-1}\right ) \left [ S^{2}+1\right ] y\left ( k\right ) & =0 \end{align*}
The roots for \(y_{p}\left ( k\right ) \) are \(r_{3}=e^{j}\) and \(r_{4}=e^{-j}\), hence \(y_{p}\left ( k\right ) =c_{3}e^{jk}+c_{4}e^{-jk}\). Substituting this into (1) gives\[ c_{3}e^{j\left ( k+2\right ) }+c_{4}e^{-j\left ( k+2\right ) }+c_{3}e^{jk}+c_{4}e^{-jk}=\sin k \] But \(\sin k=\frac{e^{jk}-e^{-jk}}{2j}\) hence\begin{align*} c_{3}e^{j\left ( k+2\right ) }+c_{4}e^{-j\left ( k+2\right ) }+c_{3}e^{jk}+c_{4}e^{-jk} & =\frac{e^{jk}-e^{-jk}}{2j}\\ c_{3}e^{jk}e^{2j}+c_{4}e^{-jk}e^{-2j}+c_{3}e^{jk}+c_{4}e^{-jk} & =\frac{1}{2j}e^{jk}-\frac{1}{2j}e^{-jk}\\ e^{jk}\left ( c_{3}e^{2j}+c_{3}\right ) +e^{-jk}\left ( c_{4}e^{-2j}+c_{4}\right ) & =\frac{1}{2j}e^{jk}-\frac{1}{2j}e^{-jk} \end{align*}
Hence\begin{align*} \left ( c_{3}e^{2j}+c_{3}\right ) & =\frac{1}{2j}\\ \left ( c_{4}e^{-2j}+c_{4}\right ) & =-\frac{1}{2j} \end{align*}
or\begin{align*} c_{3}\left ( 1+e^{2j}\right ) & =\frac{1}{2j}\\ c_{4}\left ( 1+e^{-2j}\right ) & =-\frac{1}{2j} \end{align*}
or\begin{align*} c_{3} & =\frac{-j}{2\left ( 1+e^{2j}\right ) }\\ c_{4} & =\frac{j}{2\left ( 1+e^{-2j}\right ) } \end{align*}
Hence since \(y_{p}\left ( k\right ) =c_{3}e^{jk}+c_{4}e^{-jk}\) we now obtain \[ y_{p}\left ( k\right ) =\frac{-je^{jk}}{2\left ( 1+e^{2j}\right ) }+\frac{je^{-jk}}{2\left ( 1+e^{-2j}\right ) }\] Therefore \[ y\left ( k\right ) =y_{p}\left ( k\right ) +y_{h}\left ( k\right ) \] But \(y_{h}\left ( k\right ) \) has the auxiliary equation \(r^{2}+1=0\), hence roots are \(r=\pm j\) hence \(y_{h}\left ( k\right ) =c_{1}j^{k}-c_{2}j^{k}\) hence\begin{align*} y\left ( k\right ) & =y_{p}\left ( k\right ) +y_{h}\left ( k\right ) \\ & =\frac{-je^{jk}}{2\left ( 1+e^{2j}\right ) }+\frac{je^{-jk}}{2\left ( 1+e^{-2j}\right ) }+c_{1}j^{k}-c_{2}j^{k} \end{align*}
To find \(c_{1}\) and \(c_{2}\) we need initial conditions, which is not given. So we stop here. Hence\[ y\left ( k\right ) =\frac{j}{2}\left ( \frac{e^{-jk}}{1+e^{-2j}}-\frac{e^{jk}}{1+e^{2j}}\right ) +j^{k}\left ( c_{1}-c_{2}\right ) \] This can be simplified to\begin{align*} y\left ( k\right ) & =\frac{j}{2}\left ( \frac{e^{-jk}\left ( 1+e^{2j}\right ) -e^{jk}\left ( 1+e^{-2j}\right ) }{\left ( 1+e^{-2j}\right ) \left ( 1+e^{2j}\right ) }\right ) +j^{k}\left ( c_{1}-c_{2}\right ) \\ & =\frac{j}{2}\left ( \frac{e^{-jk}+e^{j\left ( 2-k\right ) }-e^{jk}-e^{-j\left ( 2-k\right ) }}{2+2\cos 2}\right ) +j^{k}\left ( c_{1}-c_{2}\right ) \\ & =\frac{j}{2}\left ( \frac{\left ( e^{-jk}-e^{jk}\right ) +\left ( e^{j\left ( 2-k\right ) }-e^{-j\left ( 2-k\right ) }\right ) }{2+2\cos 2}\right ) +j^{k}\left ( c_{1}-c_{2}\right ) \\ & =\frac{j}{2}\left ( \frac{-2j\sin k+2j\sin \left ( 2-k\right ) }{2+2\cos 2}\right ) +j^{k}\left ( c_{1}-c_{2}\right ) \\ & =\frac{j}{2}\left ( \frac{-2j\sin k-2j\sin \left ( k-2\right ) }{2+2\cos 2}\right ) +j^{k}\left ( c_{1}-c_{2}\right ) \\ & =\frac{-1}{2}\left ( \frac{-2\sin k-2\sin \left ( k-2\right ) }{2+2\cos 2}\right ) +j^{k}\left ( c_{1}-c_{2}\right ) \end{align*}
Hence\[ y\left ( k\right ) =\frac{1}{2}\left ( \frac{\sin k+\sin \left ( k-2\right ) }{1+\cos 2}\right ) +j^{k}\left ( c_{1}-c_{2}\right ) \]
Let \(E\left ( s\right ) \) be the Laplace transform of the error signal, then we write
\begin{align} E\left ( s\right ) & =u\left ( s\right ) +g\times y\left ( s\right ) \tag{1}\\ y\left ( s\right ) & =E\left ( s\right ) G\left ( s\right ) \tag{2} \end{align}
Substitute (1) into (2)
\begin{align*} y\left ( s\right ) & =\left ( u\left ( s\right ) +gy\left ( s\right ) \right ) G\left ( s\right ) \\ & =u\left ( s\right ) G\left ( s\right ) +gy\left ( s\right ) G\left ( s\right ) \\ y\left ( s\right ) \left [ 1-gG\left ( s\right ) \right ] & =u\left ( s\right ) G\left ( s\right ) \\ H\left ( s\right ) & =\frac{y\left ( s\right ) }{u\left ( s\right ) }=\frac{G\left ( s\right ) }{1-gG\left ( s\right ) } \end{align*}
But \(G\left ( s\right ) =\frac{1}{\left ( s-1\right ) \left ( s+3\right ) }\), hence the above becomes\[ H\left ( s\right ) =\frac{1}{\left ( s-1\right ) \left ( s+3\right ) -g}\] Pole of \(H\left ( s\right ) \) is when denominator is zero. When \(g=0\), then the poles are \(s=1\) and \(s=-3\). Since one of poles is in the RHS plane (pole \(s=1\)), then the system is unstable when \(g=0\).
In other words, system stability is determined by the plant stability itself. Since the plant itself is unstable, then the overall system is unstable.
We found from the above what \(H\left ( s\right ) \) is.\[ H\left ( s\right ) =\frac{1}{\left ( s-1\right ) \left ( s+3\right ) -g}=\frac{1}{s^{2}+2s-\left ( 3+g\right ) }\] The roots of the denominator of \(H\left ( s\right ) \) are\[ s_{1,2}=\frac{-b}{2}\pm \frac{1}{2}\sqrt{b^{2}-4ac}=-1\pm \frac{1}{2}\sqrt{4+4\left ( 3+g\right ) }=-1\pm \sqrt{4+g}\] Hence\[ s_{1}=-1+\sqrt{4+g}\]\[ s_{2}=-1-\sqrt{4+g}\] For \(s_{1}\) to be stable, then \(\sqrt{4+g}<1\) or \(4+g<1\) or \(g<-3\). For \(s_{2},\) it is always stable for any value of \(g\).
When using negative feedback, the overall system transfer function will come out to be\[ H\left ( s\right ) =\frac{1}{\left ( s-1\right ) \left ( s+3\right ) +g}=\frac{1}{s^{2}+2s+\left ( g-3\right ) }\] Hence the roots of the denominator of \(H\left ( s\right ) \) are\[ s_{1,2}=\frac{-b}{2}\pm \frac{1}{2}\sqrt{b^{2}-4ac}=-1\pm \frac{1}{2}\sqrt{4-4\left ( g-3\right ) }=-1\pm \sqrt{4-g}\] Hence\[ s_{1}=-1+\sqrt{4-g}\]\[ s_{2}=-1-\sqrt{4-g}\] For \(s_{1}\) to be stable, then \(\sqrt{4-g}<1\) or \(4-g<1\) or \(g>3\). For \(s_{2},\) it is always stable for any value of \(g\).
Conclusion: For positive feedback, system is stable for \(g<-3\) and for negative feedback, system is stable for \(g>3\)
Solve the following difference equation\begin{equation} y\left ( k+2\right ) +y\left ( k\right ) =\sin k\qquad k\geq 0\tag{1} \end{equation} \(L_{A}=\left ( 1-e^{j}S^{-1}\right ) \left ( 1-e^{-j}S^{-1}\right ) \), hence\begin{align*} L_{A}\left [ S^{2}+1\right ] y\left ( k\right ) & =0\\ \left ( 1-e^{j}S^{-1}\right ) \left ( 1-e^{-j}S^{-1}\right ) \left [ S^{2}+1\right ] y\left ( k\right ) & =0 \end{align*}
The roots for \(y_{p}\left ( k\right ) \) are \(r_{3}=e^{j}\) and \(r_{4}=e^{-j}\), hence \(y_{p}\left ( k\right ) =c_{3}e^{jk}+c_{4}e^{-jk}\) Substituting this into (1) gives\[ c_{3}e^{j\left ( k+2\right ) }+c_{4}e^{-j\left ( k+2\right ) }+c_{3}e^{jk}+c_{4}e^{-jk}=\sin k \] But \(\sin k=\frac{e^{jk}-e^{-jk}}{2j}\) hence\begin{align*} c_{3}e^{j\left ( k+2\right ) }+c_{4}e^{-j\left ( k+2\right ) }+c_{3}e^{jk}+c_{4}e^{-jk} & =\frac{e^{jk}-e^{-jk}}{2j}\\ c_{3}e^{jk}e^{2j}+c_{4}e^{-jk}e^{-2j}+c_{3}e^{jk}+c_{4}e^{-jk} & =\frac{1}{2j}e^{jk}-\frac{1}{2j}e^{-jk}\\ e^{jk}\left ( c_{3}e^{2j}+c_{3}\right ) +e^{-jk}\left ( c_{4}e^{-2j}+c_{4}\right ) & =\frac{1}{2j}e^{jk}-\frac{1}{2j}e^{-jk} \end{align*}
Hence\begin{align*} \left ( c_{3}e^{2j}+c_{3}\right ) & =\frac{1}{2j}\\ \left ( c_{4}e^{-2j}+c_{4}\right ) & =-\frac{1}{2j} \end{align*}
Or\begin{align*} c_{3}\left ( 1+e^{2j}\right ) & =\frac{1}{2j}\\ c_{4}\left ( 1+e^{-2j}\right ) & =-\frac{1}{2j} \end{align*}
Or\begin{align*} c_{3} & =\frac{-j}{2\left ( 1+e^{2j}\right ) }\\ c_{4} & =\frac{j}{2\left ( 1+e^{-2j}\right ) } \end{align*}
Hence since \(y_{p}\left ( k\right ) =c_{3}e^{jk}+c_{4}e^{-jk}\) then\[ y_{p}\left ( k\right ) =\frac{-je^{jk}}{2\left ( 1+e^{2j}\right ) }+\frac{je^{-jk}}{2\left ( 1+e^{-2j}\right ) }\] Therefore \[ y\left ( k\right ) =y_{p}\left ( k\right ) +y_{h}\left ( k\right ) \] But \(y_{h}\left ( k\right ) \) has the auxiliary equation \(r^{2}+1=0\), hence roots are \(r=\pm j\) hence \(y_{h}\left ( k\right ) =c_{1}j^{k}-c_{2}j^{k}\) and\begin{align*} y\left ( k\right ) & =y_{p}\left ( k\right ) +y_{h}\left ( k\right ) \\ & =\frac{-je^{jk}}{2\left ( 1+e^{2j}\right ) }+\frac{je^{-jk}}{2\left ( 1+e^{-2j}\right ) }+c_{1}j^{k}-c_{2}j^{k} \end{align*}
To find \(c_{1}\) and \(c_{2}\) we need initial conditions, which is not given. So we stop here.
Using initial conditions. Assuming zero initial conditions, we have at \(k=0\) that \(y\left ( 0\right ) =0\), hence\begin{align*} 0 & =\frac{-j}{2\left ( 1+e^{2j}\right ) }+\frac{j}{2\left ( 1+e^{-2j}\right ) }+c_{1}-c_{2}\\ & =\frac{1}{2}\frac{-j\left ( 1+e^{-2j}\right ) +j\left ( 1+e^{2j}\right ) }{\left ( 1+e^{2j}\right ) \left ( 1+e^{-2j}\right ) }+c_{1}-c_{2}\\ 0 & =\frac{1}{2}\frac{-je^{-2j}+je^{2j}}{\left ( 2+e^{-2j}+e^{2j}\right ) }+c_{1}-c_{2}\\ 0 & =\frac{1}{2}\frac{2\sin 2}{\left ( 2+2\cos 2\right ) }+c_{1}-c_{2}\\ 0 & =\frac{1}{2}\frac{\sin 2}{1+\cos 2}+c_{1}-c_{2} \end{align*}
Therefore\begin{equation} c_{1}-c_{2}=\frac{-1}{2}\frac{\sin 2}{1+\cos 2}\tag{2} \end{equation} Now at \(k=1\), \(y\left ( k\right ) =0\), hence from \(y\left ( k\right ) =\frac{-je^{jk}}{2\left ( 1+e^{2j}\right ) }+\frac{je^{-jk}}{2\left ( 1+e^{-2j}\right ) }+c_{1}j^{k}-c_{2}j^{k}\) we obtain
\begin{align*} 0 & =\frac{-je^{j}}{2\left ( 1+e^{2j}\right ) }+\frac{je^{-j}}{2\left ( 1+e^{-2j}\right ) }+c_{1}j-c_{2}j\\ & =\frac{1}{2}\left ( \frac{-e^{j}}{\left ( 1+e^{2j}\right ) }+\frac{e^{-j}}{\left ( 1+e^{-2j}\right ) }\right ) +c_{1}-c_{2}\\ & =\frac{1}{2}\frac{\left ( -e^{j}-e^{-j}\right ) +\left ( e^{-j}+e^{j}\right ) }{\left ( 1+e^{2j}\right ) \left ( 1+e^{-2j}\right ) }+c_{1}-c_{2}\\ & =\frac{1}{2}\frac{0}{2+e^{-2j}+e^{2j}}+c_{1}-c_{2} \end{align*}
Hence \begin{equation} c_{1}=c_{2}\tag{3} \end{equation} (2)+(3) gives\begin{align*} 2c_{1} & =\frac{1}{2}\frac{-\sin 2}{1+\cos 2}\\ c_{1} & =\frac{-1}{4}\frac{\sin 2}{1+\cos 2} \end{align*}
And \[ c_{2}=\frac{1}{4}\frac{\sin 2}{1+\cos 2}\] Hence the final solution is\begin{align*} y\left ( k\right ) & =\frac{-je^{jk}}{2\left ( 1+e^{2j}\right ) }+\frac{je^{-jk}}{2\left ( 1+e^{-2j}\right ) }+c_{1}j^{k}-c_{2}j^{k}\\ & =\frac{-je^{jk}}{2\left ( 1+e^{2j}\right ) }+\frac{je^{-jk}}{2\left ( 1+e^{-2j}\right ) }-\frac{1}{4}\frac{j^{k}\sin 2}{1+\cos 2}-\frac{1}{4}\frac{j^{k}\sin 2}{1+\cos 2} \end{align*}
and HW9 combined