|
Lecture 8.1: Frequency Domain
Design
18 November 2002
|
|
This
lecture covers the basic tools in frequency domain control design through "loop
shaping". After reviewing the role of the controller on the loop shape
and the relationship between the gain and the phase, we consider several standard
controller types (proportional, lead, PI) and apply them to design a high performance
controller for the pitch axis of the Caltech ducted fan.
Mud card responses [advanced
search]:
#!/usr/bin/perl
# -*- perl -*-
#
# htdbsearch.cgi - search for matching files in a database directory
# RMM, 16 Mar 97
#
# This CGI script searches the description files in a directory for a
# against a set of criteria
#
# This script should be called as
#
# http://machine/path/htdblist.cgi?
# or
# http://machine/path/htdblist.cgi?db=&args
#
# where is the name of the configuration file that defines
# all of the information needed to generate the listing. The optional
# arguments are:
#
# _count=NN only list the first NN entries
# _tight=1 use tight listing
# _ssi=1 don't print header, trailer info (for includs)
#
# Include the necessary libraries
require "cgi-lib.pl";
require "htdblib.pl";
# Parse script arguments
if (&htdbinit) {
# If the form contains some values, use them to search, and return
# the results.
if ($in{'_dbconfig'}) {
# Generate the context header for the browser
print &PrintHeader;
# Print out the introductory information for search
if (defined &SearchHeader) {&{$SearchHeader}($DBName);}
# Summarize the search that was performed
$rsltheader =
defined &ResultHeader ? \&ResultHeader : htdb::ResultHeader;
&{$rsltheader}(%in) if (!$in{_ssi});
# Go through and look for matching files
if (not &PrintMatches) { &PrintNoMatches if (!in{ssi}); }
# Generate the trailer
if (defined &dbtrailer) {$dbtrailer = \&DBTrailer};
if (not $dbtrailer) {$dbtrailer = \&htdb::DBTrailer;}
&{$dbtrailer}($DBName) if (!in{ssi});
} else {
# Check to see if there is a user function for printing the search form
if (defined &SearchForm) {$searchform = \&SearchForm};
if (not $searchform) {$searchform = \&htdb::SearchForm;}
# Print out the introductory information for search
if (defined &SearchHeader) {&{$SearchHeader}($DBName);}
# Print the search form
&{$searchform}(%in);
}
}
#
# Subroutine for printing the matches that occured
#
sub PrintMatches {
my ($num_found);
# Go to the database directory and read the contents
chdir $DBPath || die "Can't cd to $DBPath";
opendir(DIR, '.') || die "Can't open $DBPath";
@filenames = readdir(DIR);
closedir(DIR);
# Check to see if there is a user function for checking matches
if (defined &CheckEntry) {$checkentry = \&CheckEntry};
if (not $checkentry) {$checkentry = \&htdb::CheckEntry;}
# Check to see if there is a user function for parsing filenames
if (defined &ParseFname) {$parsefname = \&ParseFname};
if (not $parsefname) {$parsefname = \&htdb::ParseFname;}
# Check to see if there is a user function for printing the entry
if (defined &PrintEntry) {$printentry = \&PrintEntry};
if (not $printentry) {$printentry = \&htdb::PrintEntry;}
# Check to see if there is a user function for printing the entry
if (defined &TightEntry) {$tightentry = \&TightEntry};
if (not $tightentry) {$tightentry = \&htdb::TightEntry;}
# Open the list environment used for the results
# Print the command to generate a list of elements
print ($in{_tight} ? "\n" : "\n");
# Loop through the filenames in order.
$getfnames = defined &GetFnames ? \&GetFnames : htdb::GetFnames;
@filenames = &{$getfnames}($DBPath);
for (@filenames) {
# Parse the filname and extract the ID and tag information
($id, $tag) = &{$parsefname}($filename = $_);
next if not $id;
# Open the file and extract the contents
$contents = &htdb::readfile($filename);
next if not $contents;
# Now see if this entry matches the criteria for a match
next if not &{$checkentry}($contents, %in);
# Print out the information associated with this entry
$count += &{($in{_tight} ? $tightentry : $printentry)}
($filename, $contents, $id, $tag, $DBURL."/".$filename);
$num_found++;
# See if we are counting and stop if needed
last if ($in{_count} && $count > $in{_count});
}
# Close the list environment used for the results
print ($in{_tight} ? "
\n" : "\n");
return $num_found;
}
#
# Subroutine for alerting the user that no matches occured
#
sub PrintNoMatches {
print "No matches found
\n";
print "Sorry, no entries match your request. ";
print "Please choose some different parameters and try again.\n";
print $footer;
}
Handouts from lecture
The following materials were handed out in lecture. These have been updated to
include any corrections.
Required reading
Supplemental reading
- A. D. Lewis,
A Mathematical Introduction to Feedback Control, Chapter 12 [pdf]
Homework
This homework set provides practice in specification and design of control
systems in the frequency domain. The first two problems work through examples
that are very similar to the one used in lecture. The CDS 110 problems explore
control of a more complicated system, the cart pendulum system (with the pendulum
pointing down).
Modifications to the homework (link above is always the latest version):
- 21 Nov 02: fixed minor bugs in problem 2 problem specification
- 19 Nov 02: updated wording on problem 3 to correspond to Wednesday lecture
- 18 Nov 02: problem set release
Frequently asked questions on homework and TA hints:
#!/usr/bin/perl
# -*- perl -*-
#
# htdbsearch.cgi - search for matching files in a database directory
# RMM, 16 Mar 97
#
# This CGI script searches the description files in a directory for a
# against a set of criteria
#
# This script should be called as
#
# http://machine/path/htdblist.cgi?
# or
# http://machine/path/htdblist.cgi?db=&args
#
# where is the name of the configuration file that defines
# all of the information needed to generate the listing. The optional
# arguments are:
#
# _count=NN only list the first NN entries
# _tight=1 use tight listing
# _ssi=1 don't print header, trailer info (for includs)
#
# Include the necessary libraries
require "cgi-lib.pl";
require "htdblib.pl";
# Parse script arguments
if (&htdbinit) {
# If the form contains some values, use them to search, and return
# the results.
if ($in{'_dbconfig'}) {
# Generate the context header for the browser
print &PrintHeader;
# Print out the introductory information for search
if (defined &SearchHeader) {&{$SearchHeader}($DBName);}
# Summarize the search that was performed
$rsltheader =
defined &ResultHeader ? \&ResultHeader : htdb::ResultHeader;
&{$rsltheader}(%in) if (!$in{_ssi});
# Go through and look for matching files
if (not &PrintMatches) { &PrintNoMatches if (!in{ssi}); }
# Generate the trailer
if (defined &dbtrailer) {$dbtrailer = \&DBTrailer};
if (not $dbtrailer) {$dbtrailer = \&htdb::DBTrailer;}
&{$dbtrailer}($DBName) if (!in{ssi});
} else {
# Check to see if there is a user function for printing the search form
if (defined &SearchForm) {$searchform = \&SearchForm};
if (not $searchform) {$searchform = \&htdb::SearchForm;}
# Print out the introductory information for search
if (defined &SearchHeader) {&{$SearchHeader}($DBName);}
# Print the search form
&{$searchform}(%in);
}
}
#
# Subroutine for printing the matches that occured
#
sub PrintMatches {
my ($num_found);
# Go to the database directory and read the contents
chdir $DBPath || die "Can't cd to $DBPath";
opendir(DIR, '.') || die "Can't open $DBPath";
@filenames = readdir(DIR);
closedir(DIR);
# Check to see if there is a user function for checking matches
if (defined &CheckEntry) {$checkentry = \&CheckEntry};
if (not $checkentry) {$checkentry = \&htdb::CheckEntry;}
# Check to see if there is a user function for parsing filenames
if (defined &ParseFname) {$parsefname = \&ParseFname};
if (not $parsefname) {$parsefname = \&htdb::ParseFname;}
# Check to see if there is a user function for printing the entry
if (defined &PrintEntry) {$printentry = \&PrintEntry};
if (not $printentry) {$printentry = \&htdb::PrintEntry;}
# Check to see if there is a user function for printing the entry
if (defined &TightEntry) {$tightentry = \&TightEntry};
if (not $tightentry) {$tightentry = \&htdb::TightEntry;}
# Open the list environment used for the results
# Print the command to generate a list of elements
print ($in{_tight} ? "\n" : "\n");
# Loop through the filenames in order.
$getfnames = defined &GetFnames ? \&GetFnames : htdb::GetFnames;
@filenames = &{$getfnames}($DBPath);
for (@filenames) {
# Parse the filname and extract the ID and tag information
($id, $tag) = &{$parsefname}($filename = $_);
next if not $id;
# Open the file and extract the contents
$contents = &htdb::readfile($filename);
next if not $contents;
# Now see if this entry matches the criteria for a match
next if not &{$checkentry}($contents, %in);
# Print out the information associated with this entry
$count += &{($in{_tight} ? $tightentry : $printentry)}
($filename, $contents, $id, $tag, $DBURL."/".$filename);
$num_found++;
# See if we are counting and stop if needed
last if ($in{_count} && $count > $in{_count});
}
# Close the list environment used for the results
print ($in{_tight} ? "
\n" : "\n");
return $num_found;
}
#
# Subroutine for alerting the user that no matches occured
#
sub PrintNoMatches {
print "No matches found
\n";
print "Sorry, no entries match your request. ";
print "Please choose some different parameters and try again.\n";
print $footer;
}