Controls Group Assignment

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 20

KINGSTON UNIVERSITY, UK

Control System Analysis


Using CODAS
EG2061 Electronics and Control

Sundeep Arandara K0748604


Chamara Abeykoon K0748603
Vithanage Serasinghe K0748618
Vineshrao Toocaram K0737918
Benedict Giritharan K0748605

Date of Submission: 24th April 2009


Marking Lecturer: Dr. Karwatzki
2
Contents
Introduction...........................................................................................................................................4
Introductory Exercise............................................................................................................................5
Explanation of Interface....................................................................................................................5
Adjusting Parameters of the Graph...................................................................................................6
Introductory Exercise Transfer Function............................................................................................6
Exercise A..............................................................................................................................................9
Exercise B.............................................................................................................................................14
Part I................................................................................................................................................14
Part II...............................................................................................................................................17
Usefulness of the Exercise...................................................................................................................19

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:

- Time Domain Graph

- Frequency Domain Graph

- Root Domain Graph

- Non-Linear Domain Graph

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.”

Bytronic CODAS - http://www.bytronic.net/html/codas.html

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.

Adjusting Parameters of the Graph


First, type in the desired transfer function and the gain and then click on the ‘Graph Scales’ button. The
following window will appear:

 Changing Axis Magnitudes:


Input desired magnitudes of the graph axes in the top four boxes (Y-axis min, Y-axis max, X-axis min,
X-axis max).

 Simulation Step Sized Adjustment (to avoid numerical instability):


This is adjusted by inputting a value into the ‘Number of Points’ textbox. The higher the number of
points (i.e. points of calculations), the greater the accuracy of the simulation. The effect of this will be
illustrated in the next section.

 Adjusting Time of Simulation:


This is done by inputting the desired duration of simulation to the ‘Duration’ textbox.

Introductory Exercise Transfer Function


The introductory exercise uses the following transfer function (along with a gain of 5):

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:

The first time-domain graph is plotted with the following settings:

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)

Draw the time domain response of the system (Graph 2.1)

Graph 2.1

9
Step 3)

Determine the Time Constant by using Time Domain Cursor (Figure 2.1)

Time constant occurs at when the response is 62.3% of magnitude.

Output at the time constant = 0.5×0.625 = 0.3125

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

Steady state error

0.5

Steady State Error = Input – Output = 1- 0.5 = 0.5

10
Determine Time Constant and Steady State Error of Close Loops System Using Analytical Method

Open loop transfer Function

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

General Form of Close Loop Transfer Function

K ss
Close Loop Transfer Function=
1+ τ d S

Kss = Close Loop Steady State Gain τ d = Time Constant

By comparing General form

Kss = 0.5 τ d = 0.25

Output = steady state Gain × Input = 0.5 ×1 = 0.5

Steady State Error = 1-0.5 = 0.5

Therefore Analytical Values confirms the simulation values of the CODAS

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

Time Constant = 0.3333

Steady State error = 1- 0.3333 = 0.6667

When Open Loop Gain = 2

2
Open Loop Transfer Function=
1+0.5 S

2
Close Loop Transfer Function=
3+ 0.5 S

Time Constant = 0.5 / 3 = o.1667


Steady State Gain = 1 – 2/3 = o.3333

When Open Loop Gain = 5

5
Open Loop Transfer Function=
1+0.5 S

5
Close Loop Transfer Function=
6+ 0.5 S

Time Constant = 0.5/ 6 = 0.0833

Steady State Error = 1-5/6 = 0.16667

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

Let x=% overshoot


ζπ
( )
∴ x=100 e √

1−ζ
2

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)

Where τI is the Integral Action Time Constant.


At τI = 0.5s,

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

Usefulness of the Exercise


- The exercise gave us an opportunity to practice CODAS functions.
- Helped us improve and expand our knowledge of control systems, especially of high order systems.

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

You might also like