Matlab Control Systems Question

In summary, the conversation discusses the use of Matlab to plot Bode plots, specifically an exponential function. The "bode" function in Matlab requires a specific type of input, but the speaker is having trouble finding out how to plot the exponential. They suggest defining a frequency vector and function, and using the semilogx function to draw the Bode plots.
  • #1
mcfetridges
13
0
I am having a problem with plotting Bode plots in Matlab. We are required to plot a e^(-sT) (simple time shift) as a Bode plot. The "bode" function in Matlab requires either a TF, ZPK, SS, or FRD system as its first input. I cannot seem to find out how to plot the exponential. I can easily plot the normal transfer functions however. If anyone has any idea that would be great.

Stephen McFetridge
University of Alberta
 
Physics news on Phys.org
  • #2
mcfetridges said:
I am having a problem with plotting Bode plots in Matlab. We are required to plot a e^(-sT) (simple time shift) as a Bode plot. The "bode" function in Matlab requires either a TF, ZPK, SS, or FRD system as its first input. I cannot seem to find out how to plot the exponential. I can easily plot the normal transfer functions however. If anyone has any idea that would be great.

Stephen McFetridge
University of Alberta
Define a frequency vector, for instance:
omega = 0.1:0.01:10
% omega goes from 0.1 rad/s to 10 rad/s by steps of o.o1 seconds.
Then define your function
H = exp(-i*omega*T)
where T is the known delay
The amplitude in dB is:
Amp = 20*log10(abs(H))
and the phase in radians
Phase = angle(H)
Now you can draw the Bode plots as
semilogx(omega, Amp)
semilogx(omega, Phase)
 
  • #3


Hi Stephen,

Thank you for reaching out with your question. I understand that you are having trouble plotting a Bode plot for a simple time shift using the "bode" function in Matlab. I would be happy to offer some suggestions to help you solve this problem.

First, let's take a look at the requirements for the first input of the "bode" function. As you mentioned, it requires a transfer function (TF), zero-pole-gain (ZPK), state-space (SS), or frequency response data (FRD) system. This means that you will need to convert your exponential function into one of these forms in order to plot it using the "bode" function.

One approach you could try is to use the "tf" function to create a transfer function from your exponential function. The syntax for this would be: TF = tf(num,den), where "num" is the numerator coefficients and "den" is the denominator coefficients of your exponential function. You can then use this transfer function as the first input for the "bode" function.

Another option is to use the "frd" function to create a frequency response data (FRD) system from your exponential function. The syntax for this would be: SYS = frd(G,w), where "G" is the magnitude and phase of your exponential function and "w" is the frequency vector. Again, you can use this FRD system as the first input for the "bode" function.

I hope these suggestions are helpful in solving your problem. If you continue to have trouble, I recommend reaching out to your professor or a teaching assistant for further assistance. Best of luck with your project!
 

Related to Matlab Control Systems Question

1. What is Matlab Control Systems Question?

Matlab Control Systems Question refers to a topic or category of questions related to control systems that are solved using Matlab, a popular mathematical computing software. These questions typically involve designing, analyzing, and simulating control systems using Matlab tools and functions.

2. What are some common applications of Matlab Control Systems?

Matlab Control Systems have a wide range of applications, including aerospace and defense, automotive, robotics, industrial automation, and biomedical engineering. They are used to control and regulate various mechanical, electrical, and biological systems, such as aircraft, cars, robots, and medical devices.

3. How do you solve a Matlab Control Systems Question?

To solve a Matlab Control Systems Question, you need to have a good understanding of control theory and Matlab. First, you will need to model the system using mathematical equations and transfer functions. Then, you can use Matlab tools like the Control System Toolbox to design and simulate the control system. Finally, you can analyze the system's response and make adjustments as needed.

4. Can Matlab Control Systems be used for real-time control?

Yes, Matlab Control Systems can be used for real-time control. Matlab has a Real-Time Workshop that allows you to generate C or C++ code from your control system design. This code can then be integrated into real-time systems, such as microcontrollers, to control physical systems in real-time.

5. Are there any resources available for learning Matlab Control Systems?

Yes, there are many resources available for learning Matlab Control Systems. You can find tutorials, online courses, books, and documentation on the official Matlab website. There are also forums and communities where you can ask questions and discuss with other users. Additionally, many universities offer courses on control systems and Matlab, which can provide you with a solid foundation in this subject.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
11
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
6K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
13
Views
2K
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
Back
Top