problem in taking the step response of a function

Hi guys
I wonder why this code gives me (0) for steady state for step(T)?
I expect that it gives me 1 in steady state as the input is step.!
If anybody knows please let me know.
Thanks
clc;
clear all;
close all;
[a,b]=ss2tf(-0.022,0.0012,17.35,0)
G=tf(a,b);
%R=0.44*step(G)
% C0=pid(1,1);
% C=pidtune(G,C0)
%C=pidtune(G,'PID')
figure(1)
subplot(2,1,1)
step(G)
subplot(2,1,2)
bode(G)
% CC=8.4+0.29/s+(-8.16/(s+0.48));
C=tf([0.24 4.29 0.144],[1 0.48 0])
%T=G/(1+G*C)
k=1;
T=feedback(G,C)
%T=feedback(G*C,1)
figure(2)
subplot(2,1,1)
step(T)
stepinfo(T)
subplot(2,1,2)
bode(T)

Answers (1)

Your ‘A matrix’ is actually a scalar: -0.022, that will evaluate to in your state space realisation. This produces a typical decaying exponential that declines to 0.5 in 31.5067 seconds, which is exactly what you see in the step plot.

Categories

Find more on Programming in Help Center and File Exchange

Products

Release

R2014b

Asked:

on 18 Sep 2019

Answered:

on 18 Sep 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!