Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

‫وزارة التعليم العالي‬

‫والبحث العلمي‬
‫كلية المصطفى الجامعة‬
‫ﻗﺴم هندسة تقنيات الحاسوب‬

‫‪control laboratory‬‬
‫الﻄﺎلﺐ‬
‫علي عبد الكريم جميل‬
‫بﺎشراف اﻻستﺎذة‬
‫رشﺎ جمﺎل‬
Design by means of root locus plots.
If you took an introductory linear systems class you learned, given a system, how
to determine system behavior (usually a step response or a Bode plot). As an
engineer the problem is typically the reverse. You know what kind of system
response you want, and it is your job to design a sysetem that meets design goals.
One common technique for doing this design is based on what is called a "root
locus" plot.
To understand what root locus plots are, and why they are important, let's examine
the behavior of a system when it is in a control system. Assume that the system is
defined by the transfer function:
Syntax
h = bodeplot(sys)
bodeplot(sys)
bodeplot(sys1,sys2,...)
bodeplot(AX,...)
bodeplot(..., plotoptions)
bodeplot(sys,w)
Description
h = bodeplot(sys) plot the Bode magnitude and phase of the dynamic system
model sys and returns the plot handle h to the plot. You can use this handle to
customize the plot with the getoptions and setoptions commands.
bodeplot(sys) draws the Bode plot of the model sys. The frequency range and
number of points are chosen automatically.
bodeplot(sys1,sys2,...) graphs the Bode response of multiple models sys1,sys2,...
on a single plot. You can specify a color, line style, and marker for each model, as
in
bodeplot(sys1,'r',sys2,'y--',sys3,'gx')
bodeplot(AX,...) plots into the axes with handle AX.
bodeplot(..., plotoptions) plots the Bode response with the options specified
in plotoptions. Type
help bodeoptions
for a list of available plot options. See Match Phase at Specified Frequency for an
example of phase matching using
the PhaseMatchingFreq and PhaseMatchingValue options.
bodeplot(sys,w) draws the Bode plot for frequencies specified by w. When w =
{wmin,wmax}, the Bode plot is drawn for frequencies
between wmin and wmax (in rad/TimeUnit, where TimeUnit is the time units of
the input dynamic system, specified in the TimeUnit property of sys.). When w is a
user-supplied vector w of frequencies, in rad/TimeUnit, the Bode response is
drawn for the specified frequencies.
See logspace to generate logarithmically spaced frequency vectors.
Examples
collapse all
Change Bode Plot Options with Plot Handle
Try This Example
View MATLAB Command
Generate a Bode plot.
sys = rss(5);
h = bodeplot(sys);

Change the units to Hz and suppress the phase plot. To do so, edit properties of the
plot handle, h.
setoptions(h,'FreqUnits','Hz','PhaseVisible','off');
The plot automatically updates when you call setoptions.
Match Phase at Specified Frequency
Try This Example
View MATLAB Command
Create a Bode plot of a dynamic system.
sys = tf(1,[1 1]);
h = bodeplot(sys);
Fix the phase at 1 rad/s to 750 degrees. To do so, get the plot properties. Then alter
the properties PhaseMatchingFreq and PhaseMatchingValue to match a phase to a
specified frequency.
p = getoptions(h);
p.PhaseMatching = 'on';
p.PhaseMatchingFreq = 1;
p.PhaseMatchingValue = 750;
Update the plot.
setoptions(h,p);

You might also like