Controls Group Assignment
Controls Group Assignment
3
Introduction
CODAS is a Controls System Design and Simulation Software.
Utilising the computer’s advanced processing capabilities to its advantage, it allows the simulation of controls
systems with complicated transfer functions and provides performance results within split seconds, in
comparison to the long time it would take to do the same calculations manually.
In this way, it also acts as a flexible controls systems design tool and learning tool, since it allows a
designer/student to easily change parameters of the system and view multiple possible performances without
too much trouble.
CODAS software can present data visually through four different graphs:
The software allows for great flexibility in terms of changing the parameters of the graph – the graph axes and
magnitudes can be easily changed. The accuracy of the simulation can also be adjusted with ease.
“CODAS for Windows is a highly integrated software package for the design and simulation of control systems.
CODAS provides time-domain, frequency domain and s-plane environments for the study of linear continuous
time systems. Discrete time systems are handled too by defining transfer functions in terms of the z-operator.
Non-linearities can be defined interactively with the effects on the system time response being simulated and
its describing functions plotted in the frequency domain.”
“CODAS of Windows features: Automated lead/lag compensator design, Automated pole-placement and
optimisation, Wide range of mappings, rectangular rule, bi-linear transformers, z-transformers, Polynomial
simplification tools, Disturbance (load) inputs and measurement noise.”
“Transfer functions are entered using the built-in editor with systems described in pole-zero form or as
polynomials or as both. The transient response of the open or closed loop system can be drawn with both the
control effort and plant output displayed on-screen. Root loci are produced using an efficient branch following
method. The frequency responses of the open and closed loop system are available in Nyquist form, Nichols
plt or as bode gain and phase curves. Closed loop gain contours (M-Contours) are drawn.”
4
Introductory Exercise
Explanation of Interface
Shown below is the CODAS Interface:
Feedback Path Nonlinearity New Root
New Time
Forward Path Nonlinearity New Time Domain
Frequency
Compensator Plant Domain Window Window
Window
Hide/Unhide System
Closed Loop New Nonlinear
Definition
Domain Window
Open Loop
Wipe Graph
Go – Draw Configuration
Response Plot-Following
Cursor Graph Scales
Pan
Auto Scale Zoom-Out
Zoom-In
Expression Evaluator
The System Definition box is where we input the transfer function. In the Introductory Exercise, we are only
interested in the Gain and Plant Transfer Function blocks.
5
To input the transfer function into the Plant block, simply click the Plant block on the Systems Definition
Window and a new window will pop-up.
Enter the numerator of the Transfer function in the top textbox and the denominator in the bottom textbox.
1.5
2
s + 2 s+1
Activate the closed loop response by clicking the ‘Closed Loop’ button (red clockwise circular button).
6
Shown below is the system definition window for the above:
We can now adjust the parameters of the graph. A point to be noted is the shape of the graph – this is as a
result of simulation with just 20 points of calculations. In the next graph, this will be increased to 200 points, in
order to get a more accurate solution.
7
The second time-domain graph is plotted with the following settings:
8
Exercise A
Open loop transfer function
1
G p ( S )=
1+ 0.5 s
Determine Time Constant and Steady State Error of the Close Loop System Using CODAS
Step 1)
Input the Open Loop Transfer function to the Plant (Figure 2.1)
Figure 2.1
Step 2)
Graph 2.1
9
Step 3)
Determine the Time Constant by using Time Domain Cursor (Figure 2.1)
Set the cursor to that point above and we can measure the time constant as shown below
Step 4)
Determine the Steady State Error using Time Domain Response Graph and Time Domain Cursor
0.5
10
Determine Time Constant and Steady State Error of Close Loops System Using Analytical Method
1
G p ( S )=
1+ 0.5 s
1
1+ 0.5 s
N G DH
Close Loop Transfer Function=
N G N H + DG D H
NG = 1 DG = 1+0.5s NH = 1 DH = 1
0.5
Close Loop Transfer Function=
1+0.25 S
K ss
Close Loop Transfer Function=
1+ τ d S
11
When Open Loop Gain = 0.5
0.5
Open Loop Transfer Function=
1+0.5 S
0.5
Close Loop Transfer Function=
1.5+ 0.5 S
2
Open Loop Transfer Function=
1+0.5 S
2
Close Loop Transfer Function=
3+ 0.5 S
5
Open Loop Transfer Function=
1+0.5 S
5
Close Loop Transfer Function=
6+ 0.5 S
12
CODAS SIMULATION
When the Open Loop gain Increases Time Constant Of the system Decreasing and steady State Error
also decreasing and it Approaches to Zero Very High Open Loop Gains. System Not Overshoot
Output reaches Near to the Input value for the Very High Open Loop Gains.
Gain 0.5 Gain 2 Gain 5
Exercise B
Part I
O/P b
13
a
t (s)
The following table shows the trial-and-error process by which the gain required to achieve 10% peak
overshoot was found. It involved changing the values in the ‘gain’ box and obtaining values using the ‘Plot-
Following Cursor’.
14
O/P at b %
Gain peak a (overshoot) overshoot
1.0000 0.3694 0.3333 0.0361 10.8300
2.0000 0.5813 0.5000 0.0813 16.2600
0.5000 0.2154 0.2000 0.0154 7.7000
0.9000 0.3421 0.3103 0.0318 10.2480
0.8500 0.3278 0.2982 0.0296 9.9260
0.8750 0.3350 0.3043 0.0307 10.0887
0.8700 0.3336 0.3031 0.0305 10.0630
0.8600 0.3307 0.3007 0.0300 9.9767
0.8650 0.3321 0.3019 0.0302 10.0300
0.8625 0.3314 0.3013 0.0301 9.9900
0.8631 0.3316 0.3014 0.0302 10.0200
0.8638 0.3318 0.3016 0.0302 10.0100
100
x= ζπ
( )
e√
1−ζ
2
ζπ
( )= 100
e√ 1−ζ
2
ζπ 100
√1−ζ 2
=ln
x ( )
2
ζ 2 π2 100
1−ζ 2 [ ( )]
= ln
x
2 2
100 100
2 2
[ ( )] [ (
ζ π = ln
x
−ζ ln
x
2
)]
2 2
100 100
2 2
[ ( )] [ (
ζ π + ζ ln
x
2
= ln
x )]
2 2
2
[ [ ( )] ] [ (
ζ π + ln
100
2
x
= ln
100
x )]
15
2 1
100
[ ] [ ( )] 2
ln
x
∴ ζ= 2
100
2
[ ( )]
π + ln
x
∴ at x=10 % .
2 1
100
[ [ ]]
[ ] 2
ζ=
( )
ln
10
2
100
π + ln (
10 )
2
ζ =0.591155033 ≈ 0.5912
Steady State Error (when gain is 0.8638) = 0.6984
Steady
State
Error
16
Part II
Using P+I will reduce steady state error of the system to zero:
1 1
1+
τI s 2
s + 2 s+2
τ I s+1 1
2
τIs s + 2 s+2
τ I s+1
(τ I s)( s 2+ 2 s+2)
17
As can be seen in the graph above, introducing P + I has reduced the system’s steady state error to zero, but
has made it more oscillatory.
Increasing the τI, increases the degree of damping on the system and makes the system less oscillatory.
18
τI = 0.5 τI = 0.7 τI = 1.1
τI = 0.9
19
- Helped us to see the accuracy of our analytical results, in comparison with the simulation.
- Allowed us to see the effect of changing various parameters to the response of the system.
20