Matlab and Simulink For Control System
Matlab and Simulink For Control System
V.SitaramGupta
Control Systems
Control means to regulate, direct, command, or govern. A system is a collection, set, or arrangement of elements (subsystems). A control system is an interconnection of components forming a system configuration that will provide a desired system response In order to identify, delineate, or define a control system, we introduce two terms: input and output here The input is the stimulus, excitation, or command applied to a control
system, and the output is the actual response resulting from a control
system
Control Systems
Control systems can have more than one input or output The input and the output represent the desired response and the actual response respectively. A control system provides an output or response for a given input or stimulus, as shown in Fig
Control system applications are found in robotics, space-vehicle systems, aircraft autopilots and controls, ship and marine control systems, intercontinental missile guidance systems, automatic control systems for hydrofoils, surface-effect ships, and high-speed rail systems including the magnetic levitation systems
shown in Fig
Transfer Function: - The transfer function is a property of the system elements only, and is not dependent on the excitation and initial conditions. The transfer function of a system (or a block) is defined as the ratio of output to input as shown in Fig
Closed-loop (Feedback Control) System: - Closed-loop control systems derive their valuable accurate reproduction of the input from feedback comparison.
MATLAB
MATLAB is essentially a programming interface that can be used for a
variety of scientific calculations, programming and graphical
visualization Its basic data element is an array, and its computations are optimized for this data type, which makes it ideal for problems with matrix and vector formulations MATLAB is also extendible by means of add-on script packages called toolboxes, which provide application-specific functions for use with
MATLAB
For this course, we will mostly be using MATLABs basic matrix/vector operations and graphing capabilities in conjunction with the control
system toolbox
Interface
See the text book Analysis and Design of Control System using MATLAB
Transfer Function Models are created using the function tf( numerator, denominator) where numerator and denominator are two vectors containing the coefficients of the polynomials in the numerator and denominator of the transfer function
The models thus generated can be used in conjunction with the operators
the complex plane. (What is the condition for stability?) Use the
commands ssdata and tfdata to extract the necessary data from the models, and eig and roots to determine stability of the system
1.2
Amplitude
0.8
0.6
0.4
0.2
0.5
2.5
Impulse response impulse(sys) Response to an arbitrary input e.g. t = [0:0.01:10]; u = cos(t); lsim(sys,u,t)
1.5 1
3.5 3 2.5 2
Amplitude
0.5
2.5
0.5
Amplitude
-0.5
-1
-1.5
5 Time (sec)
10
Bode Diagram 20
5 4 3 System: sys Pole : -2 + 4.58i Damping: 0.4 Overshoot (%): 25.4 Frequency (rad/sec): 5
Pole-Zero Map
Magnitude (dB)
-20
2
Imaginary Axis
-40
1 0 -1 -2 -3 -4 -5 -2
-60 0 -45
System: sys Pole : -2 - 4.58i Damping: 0.4 Overshoot (%): 25.4 Frequency (rad/sec): 5
Phase (deg)
-1.8
-1.6
-1.4
-1.2
-1 Real Axis
-0.8
-0.6
-0.4
-0.2
10
10 Frequency (rad/sec)
10
the block Continous and move a Transfer Fcn to the new window called
Untitled. Do the same with Source->Step Fcn and Sinks->Scope. Draw arrows (left mouse button) and connect the ports on the block. You
How to Save Results to MATLAB variables To save input and output move
two copies of the block Sinks->To Workspace. Make sure that the save format option is set to Array