# Control system response/MATLAB

• Mar 10th 2009, 12:07 AM
griffsterb
Control system response/MATLAB
This is an EE problem that I'm having a bit of trouble with. It's pretty math heavy and I used to come here with diff eqs help so I thought I would give it a shot.

I have a control system with an open loop transfer function of

G(s) = 1 / s(s^2 + s + 15)

The transfer function describes the input/output relationship of a spring-mass-damper system.

I am simply asked to simulate the step response of the system through MATLAB. Now, I know how to do this, but the response I'm getting on MATLAB doesn't fit what I would expect.

It gives me an almost perfectly linear line, like y = 2x. If I have a spring mass damper system and I provide a step voltage to the motor controlling the mass, I would expect some oscillations in the spring before it settled down at a constant position, but my MATLAB simulation doesn't show this.

I must be missing something. The MATLAB code I have looks like:

num = [1];
den = [1 1 15 0];
sys = tf(num, den);
step(sys)

Which is the correct code, because I've done this stuff for other circuits many times. So I must be missing something about the transfer function itself. Thanks for any help.
• Mar 10th 2009, 05:05 AM
CaptainBlack
Quote:

Originally Posted by griffsterb
This is an EE problem that I'm having a bit of trouble with. It's pretty math heavy and I used to come here with diff eqs help so I thought I would give it a shot.

I have a control system with an open loop transfer function of

G(s) = 1 / s(s^2 + s + 15)

The transfer function describes the input/output relationship of a spring-mass-damper system.

I am simply asked to simulate the step response of the system through MATLAB. Now, I know how to do this, but the response I'm getting on MATLAB doesn't fit what I would expect.

It gives me an almost perfectly linear line, like y = 2x. If I have a spring mass damper system and I provide a step voltage to the motor controlling the mass, I would expect some oscillations in the spring before it settled down at a constant position, but my MATLAB simulation doesn't show this.

I must be missing something. The MATLAB code I have looks like:

num = [1];
den = [1 1 1 15];
sys = tf(num, den);
step(sys)

Which is the correct code, because I've done this stuff for other circuits many times. So I must be missing something about the transfer function itself. Thanks for any help.

den=[1,1,15,0] ?

CB
• Mar 10th 2009, 07:24 AM
griffsterb
Yeah that was an error in typing up my post. I have it as [1 1 15 0] in my code.
• Mar 10th 2009, 07:54 AM
CaptainBlack
Quote:

Originally Posted by griffsterb
This is an EE problem that I'm having a bit of trouble with. It's pretty math heavy and I used to come here with diff eqs help so I thought I would give it a shot.

I have a control system with an open loop transfer function of

G(s) = 1 / s(s^2 + s + 15)

The transfer function describes the input/output relationship of a spring-mass-damper system.

I am simply asked to simulate the step response of the system through MATLAB. Now, I know how to do this, but the response I'm getting on MATLAB doesn't fit what I would expect.

It gives me an almost perfectly linear line, like y = 2x. If I have a spring mass damper system and I provide a step voltage to the motor controlling the mass, I would expect some oscillations in the spring before it settled down at a constant position, but my MATLAB simulation doesn't show this.

I must be missing something. The MATLAB code I have looks like:

num = [1];
den = [1 1 15 0];
sys = tf(num, den);
step(sys)

Which is the correct code, because I've done this stuff for other circuits many times. So I must be missing something about the transfer function itself. Thanks for any help.

With the transfer function:

G(s) = 1 / s(s^2 + s + 15)

we have:

o'''(t)+o''(t)+15o'(t)=1

for t>0. If this ever has a steady state solution all the derivatives of the output will be 0, but that would imply 0=1. So no steady state.

CB
• Mar 10th 2009, 11:31 AM
griffsterb
What would that mean physically though? I mean the motor controls a mass, and you give it a step input so it's going to start moving the mass until it reaches some point. At that point wouldn't you be reading a "steady" output from the position of the mass?
• Mar 10th 2009, 12:56 PM
CaptainBlack
Quote:

Originally Posted by griffsterb
What would that mean physically though? I mean the motor controls a mass, and you give it a step input so it's going to start moving the mass until it reaches some point. At that point wouldn't you be reading a "steady" output from the position of the mass?

Well I don't have the system diagram, so I can't tell you what it means physically. But no as it stands that impulse response never reaches an steady state.

CB
• Oct 13th 2009, 06:47 AM
tish29
maybe....
num = [1];
den = [1 1 15 0];
sys = tf(num, den);
step(sys)

shoudlnt it be more like
num = [1 0 0 0];
den = [1 1 15 0];
sys = tf(num, den);
step(sys)

or like [0 0 0 1] for NUMerator?
try it....
• Oct 13th 2009, 08:10 AM
CaptainBlack
Quote:

Originally Posted by tish29
num = [1];
den = [1 1 15 0];
sys = tf(num, den);
step(sys)

shoudlnt it be more like
num = [1 0 0 0];
den = [1 1 15 0];
sys = tf(num, den);
step(sys)

or like [0 0 0 1] for NUMerator?
try it....

tf should understand what was originally posted, as done here

CB