Matlab step response. Just need a quick check

Click For Summary

Discussion Overview

The discussion revolves around a participant's step response diagram generated using Matlab for a control system represented by the transfer function G(s) = 3 / (s^2 + 3). The participant expresses concern about the unusual shape of the step response, seeking clarification and assistance from others regarding the behavior of the system and the implications of its parameters.

Discussion Character

  • Homework-related
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant shares their Matlab code for generating the step response and notes that the resulting graph does not resemble typical step response shapes.
  • Another participant suggests a correction to the transfer function syntax in Matlab, indicating that the original code may have been incorrect.
  • A participant provides insights into the oscillatory nature of the system based on the inverse Laplace transform of G(s), noting the expected amplitude and period of oscillation.
  • Some participants discuss the implications of the system being a second-order system with zero damping, which leads to perpetual oscillation.
  • There is a suggestion that the participant may have made an error in the denominator of the transfer function, proposing an alternative form.
  • Participants express uncertainty about the adequacy of the time axis values in the graph, with differing opinions on whether 50 is sufficient.
  • One participant clarifies that the transfer function was provided as part of a question, indicating that they did not derive it themselves.

Areas of Agreement / Disagreement

Participants generally agree on the oscillatory behavior of the system due to the absence of damping. However, there are competing views regarding the correctness of the transfer function's denominator and the implications of the step response shape, leaving the discussion unresolved.

Contextual Notes

There are limitations regarding the assumptions made about the system's parameters and the definitions used in the transfer function. The discussion does not resolve the potential errors in the transfer function's formulation or the implications of the system's behavior.

AnkleBreaker
Messages
22
Reaction score
1

Homework Statement


Could someone just quickly check my Step Reponse diagram which I made using Matlab. It does not look like the usual shape for a step response system which is making me a bit worried. I'm a fairly new to Matlab and Control Engineering
untitled.jpg

Homework Equations


G(s) = 3 / ((s^2) +3)

The Attempt at a Solution


This was the code which I entered in Matlab to obtain the above step response:
num = [3]
den = [1 0 3]
G=tf(num,den)
step(G)
 
Physics news on Phys.org
Mark44 said:
The image you posted isn't showing up.

Here's your image:
View attachment 94899
Yes that's my image.. Very sorry.. I tried re uploading it and I thought it was working..
 
AnkleBreaker said:
Yes that's my image.. Very sorry.. I tried re uploading it and I thought it was working..
I added more to my previous post after you replied...
 
  • Like
Likes   Reactions: AnkleBreaker
Mark44 said:
I added more to my previous post after you replied...
untitled_after_help.jpg

This is the new step response graph I am getting after I did like you asked
 
Correction:
Matlab:
G=tf(3, [1, 0, 3])
This is probably the same as what you initially tried.

I don't know much about Control Engineering, but I do know something about Laplace transforms and such. The inverse Laplace transform of your G(s) function, ##\mathcal{L}^{-1}[G(s)]##, is ##\sqrt{3}\sin(\sqrt{3}t)##. That would explain the oscillation of the graph you show, but it doesn't explain either the period of this graph or the range (low to high values). The time-domain function I show has a period of ##\frac{2\pi}{\sqrt{3}}## and an amplitude of ##\sqrt{3}##, meaning the values should range between ##-\sqrt{3}## and ##\sqrt{3}##. For your original graph, the values range between 0 and 2, and the period seems to be right around ##2\pi##. There also seems to be an upward shift by 1 unit.
 
Mark44 said:
Correction:
Matlab:
G=tf(3, [1, 0, 3])
This is probably the same as what you initially tried.

I don't know much about Control Engineering, but I do know something about Laplace transforms and such. The inverse Laplace transform of your G(s) function, ##\mathcal{L}^{-1}[G(s)]##, is ##\sqrt{3}\sin(\sqrt{3}t)##. That would explain the oscillation of the graph you show, but it doesn't explain either the period of this graph or the range (low to high values). The time-domain function I show has a period of ##\frac{2\pi}{\sqrt{3}}## and an amplitude of ##\sqrt{3}##, meaning the values should range between ##-\sqrt{3}## and ##\sqrt{3}##. For your original graph, the values range between 0 and 2, and the period seems to be right around ##2\pi##. There also seems to be an upward shift by 1 unit.
Thank you very much for your help. I'll try to ask Sir tomorrow what went wrong with my graph. One last question, on the time axis I have only put values up to 50. Is that enough or should I put more/less than 50, in your opinion
 
AnkleBreaker said:
Thank you very much for your help. I'll try to ask Sir tomorrow what went wrong with my graph. One last question, on the time axis I have only put values up to 50. Is that enough or should I put more/less than 50, in your opinion
50 should be enough, I think.

You didn't show the rest of your m-file, so perhaps there's something wrong in it. Here's a link to the documentation for step() - http://www.mathworks.com/help/control/ref/step.html
 
AnkleBreaker said:

Homework Equations


G(s) = 3 / ((s^2) +3)
That is a second order system with zero damping, so once it is given a jolt it will oscillate sinusoidally forever, as your graph demonstrates.

To see what to expect in terms of damping and natural frequency, compare your system's denominator s2 + 3
with the denominator for a general second-order system, viz.,
s2 + 2ζωns + ωn2
 
  • Like
Likes   Reactions: AnkleBreaker
  • #10
NascentOxygen said:
That is a second order system with zero damping, so once it is given a jolt it will oscillate sinusoidally forever, as your graph demonstrates.

To see what to expect in terms of damping and natural frequency, compare your system's denominator s2 + 3
with the denominator for a general second-order system, viz.,
s2 + 2ζωns + ωn2
Ohh there was no damping ratio. I get it now. That explains a lot. Thank you very much
 
  • #11
Mark44 said:
50 should be enough, I think.

You didn't show the rest of your m-file, so perhaps there's something wrong in it. Here's a link to the documentation for step() - http://www.mathworks.com/help/control/ref/step.html
Thank you for all your help. User NascentOxygen's answer states that the graph oscillates infinitely due to there being an absence of a damper, which makes a lot of sense and explains a whole lot.
 
  • #12
AnkleBreaker said:
Ohh there was no damping ratio. I get it now. That explains a lot. Thank you very much
So possibly there is a mistake in your denominator? Perhaps you meant the denominator to be (s + 3)^2

How was the denominator determined?
 
  • #13
NascentOxygen said:
So possibly there is a mistake in your denominator? Perhaps you meant the denominator to be (s + 3)^2

How was the denominator determined?
This was part of a question. In the question they say:
Arm dynamics are represented by:
G(s) = 3 / ((s^2) +3)

So G(s) = 3 / ((s^2) +3) is part of the question and I did not derive it

And they want us to find a phase lead controller/compensator to fit required poles, which I did. I was just confused on why the step response of the original system didn't behave normally
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
12K
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
14K
  • · Replies 13 ·
Replies
13
Views
6K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
7K
  • · Replies 6 ·
Replies
6
Views
3K