Frequency Response
Table of Contents
Previously, we have determined the time response of linear systems to arbitrary inputs and initial conditions
We have also studied the character of certain standard systems to certain simple inputs
% use lsim
A = -5;
B = 1;
C = 1;
D = 0;
G = ss(A,B,C,D);
w = pi;
t = linspace(0,2*pi,200);
x0 = 0;
x = sin(w*t);
[y,tout] = lsim(G,x,t,x0);
plot(t,x), hold on
plot(tout,y), hold off
grid on
xlabel('t')
axis tight, ylim([-1,1])
leg = legend('input','output');
set(leg, 'fontsize', 12)
% sinusoidal inputs with different w
A = -5;
B = 1;
C = 1;
D = 0;
G = ss(A,B,C,D);
x0 = 0;
t = linspace(0,2*pi,200);
W = [1,5,10,20];
for w = W
x = sin(w*t);
[y,tout] = lsim(G,x,t,x0);
plot(tout,y), hold on
end
hold off
grid on
axis tight, ylim([-0.3,0.3])
xlabel('t')
leg = legend('\omega = 1','\omega = 5','\omega = 10','\omega = 20');
set(leg, 'fontsize', 12)
Two primary quantities of interest that have implications for system performance are:
Example
w = 0.1:0.1:100;
A = 5./abs(1j*w+5);
P = -angle(1j*w+5)*180/pi;
subplot(2,1,1), plot(w, A, 'linewidth', 2)
yticks([0,0.5,1])
ylabel('|H(j\omega)|', 'fontsize', 13)
xlabel('\omega', 'fontsize', 15)
subplot(2,1,2), plot(w, P, 'linewidth', 2)
yticks([-90, -45, 0])
ylabel('\angle H(j\omega)', 'fontsize', 13)
xlabel('\omega', 'fontsize', 15)
% later, we will see that this is kind of a bode plot
If the output signal is a scalar multiple of the input signal, we refer to the signal as an eigenfunction and the multiplier as the eigenvalue.
Fact: complex exponentials are eigenfunctions of LTI systems
$$H(s_0) = K \frac{(s_0 - z_0)(s_0 - z_1)(s_0 - z_2)\cdots}{(s_0 - p_0)(s_0 - p_1)(s_0 - p_2)\cdots}$$
Each factor in the numerator/denominator corresponds to a vector from a zero/pole (here $z_0$) to $s_0$, the point of interest in the s-plane
The value of $H(s)$ at a point $s = s_0$ can be determined by combining the contributors of the vectors associated with each of the poles and zeros
$$H(s_0) = K \frac{(s_0 - z_0)(s_0 - z_1)(s_0 - z_2)\cdots}{(s_0 - p_0)(s_0 - p_1)(s_0 - p_2)\cdots}$$
$$\lvert H(s_0) \rvert = \lvert K \rvert \frac{\lvert(s_0 - z_0)\rvert \lvert(s_0 - z_1)\rvert \lvert(s_0 - z_2)\rvert \cdots}{\lvert(s_0 - p_0)\rvert \lvert(s_0 - p_1)\rvert \lvert(s_0 - p_2)\rvert \cdots}$$
$$\angle H(s_0) = \angle K + \angle(s_0 - z_0) + \angle(s_0 - z_1) + \angle(s_0 - z_2) + \cdots - \angle (s_0 - p_0) - \angle(s_0 - p_1) - \angle(s_0 - p_2)- \cdots$$
2) Isolated pole
$$H(s) = \frac{9}{s - p_1}$$3) More complicated systems: pole and zero
$$H(s) = 3\frac{s-z_1}{s - p_1}$$4) More complicated systems: two poles
$$H(s) = \frac{15}{(s-p_1))s - p_2)}$$r = 0:0.05:4;
zeta = 0.1:0.2:1;
A = [];
for i = 1:length(zeta)
A(i,:) = 1./sqrt((1-r.^2).^2 + (2*zeta(i)*r).^2);
end
plot(r, A)
xlabel('\gamma')
ylabel('A')
legend('0.1','0.3','0.5','0.7','0.9')
phi = [];
for i = 1:length(zeta)
phi(i,:) = -atan2((2*zeta(i).*r),(1-r.^2));
end
plot(r,phi*180/pi)
xlabel('\gamma')
ylabel('\phi')
legend('0.1','0.3','0.5','0.7','0.9')
%%html
<center><iframe src="https://www.youtube.com/embed/ZGPtPkTft8g?rel=0"
width="560" height="315" frameborder="0" allowfullscreen></iframe></center>
Frequency response
Poles and zeros
Thinking about systems as collections of poles and zeros is an important design concept.
Simple: just a few numbers characterize entire system
Powerful: complete information about frequency response
1) Asymptotic Behavior: Isolated Zero
2) Asymptotic Behavior: Isolated Pole
3) Asymptotic Behavior of More Complicated Systems
1) Asymptotic Behavior: Isolated zero
2) Asymptotic Behavior: Isolated Pole
3) Asymptotic Behavior of More Complicated Systems
%%html
<center><iframe src="https://www.youtube.com/embed/_eh1conN6YM?rel=0"
width="560" height="315" frameborder="0" allowfullscreen></iframe></center>
%%html
<center><iframe src="https://www.youtube.com/embed/CSAp9ooQRT0?rel=0"
width="560" height="315" frameborder="0" allowfullscreen></iframe></center>
%%html
<center><iframe src="https://www.youtube.com/embed/E6R2XUEyRy0?rel=0"
width="560" height="315" frameborder="0" allowfullscreen></iframe></center>
%%html
<center><iframe src="https://www.youtube.com/embed/O2Cw_4zd-aU?rel=0"
width="560" height="315" frameborder="0" allowfullscreen></iframe></center>
%%html
<center><iframe src="https://www.youtube.com/embed/4d4WJdU61Js?rel=0"
width="560" height="315" frameborder="0" allowfullscreen></iframe></center>
%%html
<center><iframe src="https://www.youtube.com/embed/GIlx9Yu__y8?rel=0"
width="560" height="315" frameborder="0" allowfullscreen></iframe></center>
G = tf([1],[1,1]);
bode(G)
grid on
nyquist(G)
axis equal
G = tf([1],conv([1,1],[0.1,1]));
bode(G)
grid on
nyquist(G)
axis equal
s = tf('s');
G = 1/(s+1)^3;
bode(G)
grid on
nyquist(G)
axis equal
%%javascript
$.getScript('https://kmahelona.github.io/ipython_notebook_goodies/ipython_notebook_toc.js')