Finding Transfer Functions in MatLab 7: How to Access the Control Toolbox

In summary, the conversation discusses finding the transfer function for a simple RL circuit using Matlab version 7. The speaker is able to find it with a code using the tf function, but when they try it with version 7, it says the function is undefined. The expert suggests checking for the right toolboxes and getting help from campus computing support. The speaker later discovers that they need the control system toolbox, but it needs to be purchased.
  • #1
JoshHolloway
222
0
I am trying to find the transfer function for a simple RL circuit. At my school they don't use version 7, and I was able to find it with this code:
NUM = 20e3;
DEN = [1 20e3];
sys = tf(NUM, DEN)

That found the transfer function for the RL series circuit with a 20K resistor and a Inductor with a value of 500mH. The transfer function was [tex] \frac{20000}{s+20000}[/tex].

When I try this same code with MatLab version 7, it says that tf is not an undefined function. How do I find the Transfer Function with version 7?
 
Last edited:
Physics news on Phys.org
  • #2
JoshHolloway said:
I am trying to find the transfer function for a simple RL circuit. At my school they don't use version 7, and I was able to find it with this code:
NUM = 20e3;
DEN = [1 20e3];
sys = tf(NUM, DEN)

That found the transfer function for the RL series circuit with a 20K resistor and a Inductor with a value of 500mH. The transfer function was [tex] \frac{20000}{s+20000}[/tex].

When I try this same code with MatLab version 7, it says that tf is not an undefined function. How do I find the Transfer Function with version 7?

It's not that version 7 doesn't support transfer functions. You need the right toolboxes. Type help tf. You will get the path where the m file is located. From this you should be able to tell what toolbox you need. I presume you need the control systems toolbox.
 
  • #3
when i type help tf it says:
tf.m not found.

How do I get it?
 
  • #4
I found it on the mathworks website, but you have to buy it. Do you know where I can find this toolbox for free?
 
  • #5
JoshHolloway said:
I found it on the mathworks website, but you have to buy it. Do you know where I can find this toolbox for free?

I'm sure you can figure out how this might be done.
 
  • #6
I have tried. How about you tell me if you know?
 
  • #7
Still can't figure out how to get the new toolboxes. Could someone please help?
 
  • #8
OK. So I found the toolbox I need. It is called the control system toolbox. PLEASE help me figure out how to get it!
 
  • #9
you have to purchase those toolboxes, thay are easy to download then install.
 
  • #10
JoshHolloway,

Are you using Matlab 7 on campus?

If so, I imagine your school has a license for the control toolbox. You should check in the "licenses" folder in the main Matlab directory.

In that folder there should be either a .dat or .lic file, which needs to be up-to-date in order for you to get all the toolboxes your school has licensed. Check with your campus computing support, and ask them specifically about what I've described.

This advice comes pretty late, I know, but I'd had problems similar to yours before, so I thought I'd register and give my two cents.
 

1. What is a transfer function in MatLab?

A transfer function in MatLab is a mathematical representation of the relationship between the input and output of a system. It describes how the input affects the output in terms of frequency and magnitude.

2. How do I create a transfer function in MatLab?

To create a transfer function in MatLab, you can use the "tf" function and specify the coefficients of the numerator and denominator polynomials. Alternatively, you can use the "zpk" function to specify the poles, zeros, and gain of the transfer function.

3. Can I plot a transfer function in MatLab?

Yes, you can use the "bode," "nyquist," or "step" functions to plot the frequency response, Nyquist plot, or step response of a transfer function in MatLab. You can also use the "pzmap" function to plot the poles and zeros of the transfer function.

4. How do I analyze the stability of a transfer function in MatLab?

To analyze the stability of a transfer function in MatLab, you can use the "margin" function to plot the gain and phase margins and determine if the system is stable. You can also use the "pole" function to check the location of the poles and determine if they are within the unit circle for a stable system.

5. Can I convert a transfer function to a state-space representation in MatLab?

Yes, you can use the "tf2ss" function to convert a transfer function to a state-space representation in MatLab. This allows for further analysis and control design using state-space methods.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
1
Views
781
Replies
13
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
329
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
9K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
12K
Back
Top