User:DukeEgr93/RL Example

From PrattWiki
Jump to navigation Jump to search

This page is a sandbox to go over an example of how to analyze a non-unity feedback system with proportional control. This will include stability analysis, steady-state error determination, sketching a basic root locus plot, using computational tools to gather information for a more refined sketch, using MATLAB to generate a root locus plot, and finally using Maple or MATLAB to satisfy certain design criteria using the concept of a root locus plot. This page is based on MATLAB R2020a and Maple 2019.

Introduction

This page will use the system as shown in Figure 8.1 of Nise 8e. Sections 8.1-8.3 develop the mathematics behind a root locus plot. The keys are as follows:

  • The overall transfer function is: $$T=\frac{KG}{1+KGH}$$; this is the system we will use to determine stability and transient characteristics.
  • The equivalent forward path for an equivalent unity feedback system is: $$G_{eq}=\frac{KG}{1+KGH-KG}$$; this is the system we will use to determine steady state error.

Specific Processes

Creating Transfer Functions in MATLAB

  • Generally, start with s = tf('s') to define a variable that has the Control Systems Toolbox definition of the frequency variable.
  • Use s to create the transfer function. Alternately, use the tf or zpk commands.

Importing Transfer Functions to SISOtool

You can start SISOtool with arguments that provide values to the four transfer functions in the default architecture. The following startup commands work:

sisotool
sisotool(G)
sisotool(G, C)
sisotool(G, C, H, F)
<source>
Any unspecified transfer function is a 1.  You can also change transfer functions once SISOtool is running:
* Click the "Edit Architecture" icon in the "Control System" tab at the top
* Replace the Value entry for the particular transfer function you want to change with either a command that creates your desired transfer function or a variable name containing the transfer function.

=== Getting Controller Value ===
To get the gain, select the compensator $$C$$ from the '''Controllers and Fixed Blocks''' portion of the '''Data Browser''' at the far left.  The gain $$K$$ will be the value of the block.  If you have a more complicated controller, clicking on $$C$$ will show you the whole controller.

=== Getting Overall System Poles and Zeros ===
To get information about the overall system:
* Click the Export icon in the Control System tab
* Export the <code>IOTransfer_r2y</code> transfer function - you may need to make the selection box wider to see the full names of the transfer functions.  Note that <code>IOTransfer_r2y</code> will be exported as a state space definition.
* To see the overall transfer function as a transfer function, in the command window type one of the following commands:
:<source>
tf(IOTransfer_r2y)
zpk(IOTransfer_r2y)
to see the overall transfer function as a ratio of polynomials or as factored polynomials.
  • To see the zeros and poles of the transfer function, in the command window, type:
zero(IOTransfer_r2y)
pole(IOTransfer_r2y)
to get the zeros and poles, respectively

Breakaway / Break-in

  • Make the root locus plot
  • Move a pole to a location where it meets another pole (i.e. a critical pole)
  • Get the gain and find the pole and zero locations as shown above.

Specific Design Criteria

  • Make the root locus plot
  • Right click the Root Locus Editor plot, go to Design Requirements, add a new one, then enter the nature and value of the design requirement. Once you click OK, there will be a dark line showing where a pole needs to be to satisfy that condition.
  • If possible, move a pole to a location where it satisfies that condition.
  • Get the gain and find the pole and zero locations as shown above.
  • If you need to change a design requirement, right click the gold part of its graphical representation on screen and select Edit.


Examining Transient Characteristics

  • The Step Response plot shows the step response for the system.
  • Right-click in that plot and select the Characteristics sub-menu.
  • Choose what you want to have displayed - when you pick a characteristic, that location on the graph on which that characteristic is based will show up as a dot on the plot.
  • If you want to look at the value, for a characteristic, hover over the dot.
  • If you want the info box to remain, left-click the dot. You can now also drag the info box into one of four different locations relative to the dot.
  • If you want the box to go away, left-click the dot (or really anywhere in the plot other than the infobox itself).


References

Control System Designer R2020a documentation from MATLAB