Friday, May 10, 2013

Matlab/Octave for the UG students of the subject - Control Systems


Students of the subject “Control Systems” can use GNU Octave for practising Matlab code.
Following is an example of a simple session while using Octave version 3.6.3 under a Fedora 17 installation.
BODE PLOT
Example 1:
System: (1 + s)

octave:1> sys1 = tf([1 1],[1])

Transfer function 'sys1' from input 'u1' to output ...

y1: s + 1

Continuous-time model.
octave:2> bode(sys1)
octave:5>

The resulting plot:



Example 1:
System: 30/(1 + 0.5s)(s + 1)(s + 5)

octave:13> [numer, denom] = zp2tf([],[-2 -1 -5], 60)
numer = 60
denom =

1 8 17 10

octave:14> sys2 = tf(numer, denom)

Transfer function 'sys2' from input 'u1' to output ...

60
y1: -----------------------
s^3 + 8 s^2 + 17 s + 10

Continuous-time model.
octave:16> close all
octave:17> bode(sys2)
octave:18>
The resulting plot:
Thanks for visiting!