Plotting Output of Function Given Transfer Function and Input in MATLAB

Click For Summary
SUMMARY

The discussion focuses on plotting the output of a system defined by a transfer function in MATLAB. The transfer function is defined as H(s) = 1000/(s^2 + s + 1000) with parameters m = 1, b = 2, and k = 1000. The input is specified as a unit step function from 0 to 10 seconds, expressed in MATLAB using the Heaviside function. The proposed method involves using the inverse Laplace transform and convolution to obtain the output, which is a valid approach for this problem.

PREREQUISITES
  • Understanding of transfer functions in control systems
  • Familiarity with MATLAB programming and syntax
  • Knowledge of the Heaviside step function
  • Basic concepts of Laplace transforms and convolution
NEXT STEPS
  • Learn how to implement inverse Laplace transforms in MATLAB using the 'ilaplace' function
  • Research convolution techniques in MATLAB, specifically using the 'conv' function
  • Explore the use of the 'tf' function for defining transfer functions in MATLAB
  • Study the properties and applications of the Heaviside function in signal processing
USEFUL FOR

Control system engineers, MATLAB users, and anyone involved in signal processing or system analysis will benefit from this discussion.

magnifik
Messages
350
Reaction score
0
i am trying to plot the output of a function given the transfer function and an input. however, i am having trouble with trying to express the input as a function in MATLAB

my transfer function is
m = 1;
b = 2;
k = 1000;
num = [ 1000 ];
den = [ m b k ];
transferfunction = tf(num, den)

so it's equal to H(s) = 1000/(s^2 + s + 1000)

i am given that the input is 1 from 0 < t < 10 and 0 elsewhere
i know that x(t) in terms if unit step is x(t) = U(t)*U(10 - t) --- how do i express this in MATLAB?

after this, my plan is to do q = ilaplace(transferfunction) and conv(q, x) to get the output. is this a correct method?
 
Physics news on Phys.org
is this correct...
t = 0:0.001:10; %do i even need this??
td = 10;
x1 = heaviside(t) - heaviside(t-td);
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
Replies
23
Views
6K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 3 ·
Replies
3
Views
7K