Thank you so much.
d)MATLAB:
format long;
wn=10;d=0.5;
num=[wn^2]
den=[1 2*d*wn wn^2]
g2s=tf(num,den)
%Analog to digital Ttansfer function
fs=100
T=2.5;
ts=1/fs
[b,a]=bilinear(num,den,fs)
g2z=tf(b,a,ts)
Command window:
>> g2s
Transfer function 'g2s' from input 'u1' to output ...
100
y1: ----------------
s^2 + 10 s + 100
Continuous-time model.
>> g2z
Transfer function 'g2z' from input 'u1' to output ...
0.998 z^2 + 1.996 z + 0.998
y1: ---------------------------
z^2 + 1.996 z + 0.996
Sampling time: 0.01 s
Discrete-time model.
e)
clc;close all;clear all;
format long;
wn=10;d=0.5;
num=[wn^2]
den=[1 2*d*wn wn^2]
g2s=tf(num,den)
%Analog to digital Ttansfer function
fs=100
T=2.5;
ts=1/fs
[b,a]=bilinear(num,den,fs)
g2z=tf(b,a,ts)
n=0:1:T/ts
%Impulse response
x=(n==0)
h=filter(b,a,x)
%step response
x1=(n>=0)
y=conv(h,x1)
m=0:1:2*T/ts
stem(m,y)
xlabel('n')
ylabel('y(n)')
title('Step response')
Thank you so much. 0O A classic second order system has transfer function G(s) where the symbols have their usual meanings. Take the undamped natural frequency to be 10 rad/s throughout this exercise...
A classic second order system has transfer function
the undamped natural frequency to be 10 rad/s throughout this
exercise. Note, for the following MATLAB simulations you need to
use format long defined at the top of the program to get full
precision.
a) Use MATLAB to plot the step response for three damping
factors of ζ =0.5,1 and 1.5 respectively. step(g,tfinal)_ where
tfinal is the max time you need to make it 2 secs and g is the
b) Takeζ...