Вы находитесь на странице: 1из 4

Department of Mechanical Engineering

EXPERIMENT NO. 4 Date: / /

Simulation of linear system to different inputs


AIM
The objective of this exercise is to use graphical user interface diagrams to model the physical
systems for the purpose of design and analysis of control systems. We will learn how
MATLAB/SIMULINK helps in solving such models.

Introduction:-
To understand and control physical systems, one of the initial requirements is to obtain the
mathematical models of these systems. A model is one that quantitatively describes the
relationship between the input and output of system. To model systems, we use Simple Electrical
R-C with simplifying assumptions.

However, the classical approach of modeling linear systems is the transfer function technique
which is derived from the differential equation using Laplace transform.Transfer function yield
more intuitive information than the differential equation by visualizing the effect of system
parameter variations on the system response.

This lab introduces powerful graphical user interface (GUI), Simulink of Matlab. This software is
used for solving the modeling equations and obtaining the response of a system to different inputs.
Both linear and nonlinear differential equations can be solved numerically with high precision and
speed, allowing system responses to be calculated and displayed for many input functions. To
provide an interface between systemss modeling equations and the digitalcomputer, block
diagrams drawn from the systems differential equations are used. A block diagram is an

Control Engineering
Department of Mechanical Engineering

interconnection of blocks representing basic mathematical operations in such a way that the overall
diagram is equivalent to the systems mathematical model.

STEP (Source library)


A Simulink block is provided for a Step input, a signal that changes (usually from zero) to a
specified new, constant level at a specified time. These levels and time can be specified through
the dialog box, obtained by double-clicking on the Step block.

Fig.2 Step Block

RAMP (Source library)


The Ramp block generates a signal that starts at a specified time and value and changes by a
specified rate. The block's Slope, Start time, and Initial output parameters determine the
characteristics of the output signal. All must have the same dimensions after scalar expansion.

Fig.3 Ramp Block

SCOPE (Sinks library)


The system response can be examined graphically, as the simulation runs, using the Scope block in
the sinks library. This name is derived from the electronic instrument, oscilloscope, which
performs a similar function with electronic signals. Any of the variables in a Simulink diagram can
be connected to the Scope block, and when the simulation is started, that variable is displayed. It is
possible to include several Scope blocks. Also it is possible to display several signals in the same
scope block using a MTJX block in the signals & systems library. The Scope normally chooses its
scales automatically to best display the data. Two additional blocks will beneeded if we wish to
use MATLAB to plot the responses versus time. These are the Clock and the To Workspace

Control Engineering
Department of Mechanical Engineering

blocks.

Fig.4 Scope

Transfer Function (Continuous):-

The Transfer Fcn block models a linear system by a transfer function of the Laplace-domain
variable s. The block can model single-input single-output (SISO) and single-input multiple output
(SIMO) systems.

Fig.5 Transfer Function

Load simulink by simply typing simulink at the MATLAB prompt. Once simulink has loaded,
create a new model by going to File, New ! Model (or alternatively press CTRL+N). Next, begin
placing components on the empty window. Make your system look like the following:

Now, replace the variable K with a 1 in the constant gain controller. Run the simulation by
clicking on the triangle-shaped play icon in the toolbar and see what happens. Double-click on
the scope to see the output of the simulation. Is the output stable? Increase the gain to 2 and re-run

Control Engineering
Department of Mechanical Engineering

the simulation. Continue increasing the gain to 10, and observe the results. Keep in mind that a
linear system that is completely oscillatory, for a step or impulse input, is unstable. Convince
yourself of this.
Task 1. For what values of K is the system stable? For roughly what value of K is the system
completely oscillatory? Now, change the gain to 8, and replace the step input with a ramp input.
Re-run the simulation.
Task 2. The steady-state error is defined as the difference between the input and output signals
when t ! 1. Using the mouse, zoom in on the scope output at t = 10 seconds. Make an estimate of
the steady-state error of this system due to a ramp input.
Task 3. What is the closed-loop transfer function for this system (leave K as a variable)? What is the
characteristic equation? What are the locations of the poles (i.e. s =?) Leave K as a variable in the
characteristic equation and pole locations. Also, evaluate the expression for the pole locations for
any value of K=unstable, K=oscillatory and K=stable.

Control Engineering

Вам также может понравиться