15-01-2013, 11:59 AM
Matlab and Simulink for Modeling and Control
1Matlab and Simulink.pdf (Size: 91.51 KB / Downloads: 295)
Introduction
With the help of two examples, a DC motor and a magnetic levitation system, the use of MATLAB and
Simulink for modeling, analysis and control design is demonstrated. It is assumed that the reader already
has basic knowledge of MATLAB and Simulink. The main focus is on the use of the Control System Toolbox
functions. We recommend the reader to try the commands out directly in MATLAB while reading this text.
Modeling a DC Motor
In this example we will learn how to develop a linear model for a DC motor, how to analyze the model under
MATLAB (poles and zeros, frequency response, time-domain response, etc.), how to design a controller, and
how to simulate the open-loop and closed-loop systems under SIMULINK.
MATLAB Representation
The above transfer function can be entered into Matlab by defining the numerator and denominator polynomials,
using the conventions of the MATLAB’s Control Toolbox. The coefficients of a polynomial in s are entered in a descending order of the powers of s.
Example: The polynomial A = 3s3 + 2s + 10 is in MATLAB entered as: A = [3 0 2 10].
Furthermore, we will make use of the function conv(A,B), which computes the product (convolution) of the
polynomials A and B. Open the M-file motor.m. It already contains the definition of the motor constants
Linearization of Nonlinear Simulink Model
In this section, we will use an example of a highly nonlinear system to show how to linearize a nonlinear
Simulink model and extract the linearized model to MATLAB for control design purposes.
Magnetic Levitation System
Magnetic levitation as a friction-less support for high-speed trains, in bearings of low-energy motors, etc. It
consists of an electromagnet which is attracted to an object made of a magnetic material (such as a rail). The
control goal is to keep the air gap between this material and the electromagnet constant by controlling the
current in the coil. A schematic drawing is given in Figure 11.