Site Network: Home | Blogcrowds | Gecko and Fly | Free Online Libraries | Free Antivirus | Free CAD Software | Free Software | Telegraph TV | About

Advertisement

Your Ad Here

UTeM BMFR Google Search Engine

Custom Search
Showing posts with label Control System Engineering. Show all posts
Showing posts with label Control System Engineering. Show all posts


File : pdf, 846 pages, 5.2 MB

by Hugh Jack, PhD


2. PROGRAMMABLE LOGIC CONTROLLERS
2.1 INTRODUCTION
2.1.1 Ladder Logic
2.1.2 Programming
2.1.3 PLC Connections
2.1.4 Ladder Logic Inputs
2.1.5 Ladder Logic Outputs
2.2 A CASE STUDY
2.3 SUMMARY
2.4 PRACTICE PROBLEMS
2.5 PRACTICE PROBLEM SOLUTIONS
2.6 ASSIGNMENT PROBLEMS

3. PLC HARDWARE
3.1 INTRODUCTION
3.2 INPUTS AND OUTPUTS
3.2.1 Inputs
3.2.2 Output Modules
3.3 RELAYS
3.4 A CASE STUDY
3.5 ELECTRICAL WIRING DIAGRAMS
3.5.1 JIC Wiring Symbols
3.6 SUMMARY
3.7 PRACTICE PROBLEMS
3.8 PRACTICE PROBLEM SOLUTIONS
3.9 ASSIGNMENT PROBLEMS

4. LOGICAL SENSORS
4.1 INTRODUCTION
4.2 SENSOR WIRING
4.2.1 Switches
4.2.2 Transistor Transistor Logic (TTL)
4.2.3 Sinking/Sourcing
4.2.4 Solid State Relays
4.3 PRESENCE DETECTION
4.3.1 Contact Switches
4.3.2 Reed Switches
4.3.3 Optical (Photoelectric) Sensors
4.3.4 Capacitive Sensors
4.3.5 Inductive Sensors
4.3.6 Ultrasonic
4.3.7 Hall Effect
4.3.8 Fluid Flow
4.4 SUMMARY
4.5 PRACTICE PROBLEMS
4.6 PRACTICE PROBLEM SOLUTIONS
4.7 ASSIGNMENT PROBLEMS

5. LOGICAL ACTUATORS
5.1 INTRODUCTION
5.2 SOLENOIDS
5.3 VALVES
5.4 CYLINDERS
5.5 HYDRAULICS
5.6 PNEUMATICS
5.7 MOTORS
5.8 COMPUTERS
5.9 OTHERS
5.10 SUMMARY
5.11 PRACTICE PROBLEMS
5.12 PRACTICE PROBLEM SOLUTIONS
5.13 ASSIGNMENT PROBLEMS

6. BOOLEAN LOGIC DESIGN
6.1 INTRODUCTION
6.2 BOOLEAN ALGEBRA
6.3 LOGIC DESIGN
6.3.1 Boolean Algebra Techniques
6.4 COMMON LOGIC FORMS
6.4.1 Complex Gate Forms
6.4.2 Multiplexers
6.5 SIMPLE DESIGN CASES
6.5.1 Basic Logic Functions
6.5.2 Car Safety System
6.5.3 Motor Forward/Reverse
6.5.4 A Burglar Alarm
6.6 SUMMARY
6.7 PRACTICE PROBLEMS
6.8 PRACTICE PROBLEM SOLUTIONS
6.9 ASSIGNMENT PROBLEMS

7. KARNAUGHMAPS
7.1 INTRODUCTION
7.2 SUMMARY
7.3 PRACTICE PROBLEMS
7.4 PRACTICE PROBLEM SOLUTIONS
7.5 ASSIGNMENT PROBLEMS

8. PLC OPERATION
8.1 INTRODUCTION
8.2 OPERATION SEQUENCE
8.2.1 The Input and Output Scans
8.2.2 The Logic Scan
8.3 PLC STATUS
8.4 MEMORY TYPES
8.5 SOFTWARE BASED PLCS
8.6 SUMMARY
8.7 PRACTICE PROBLEMS
8.8 PRACTICE PROBLEM SOLUTIONS
8.9 ASSIGNMENT PROBLEMS

9. LATCHES, TIMERS, COUNTERS AND MORE
9.1 INTRODUCTION
9.2 LATCHES
9.3 TIMERS
9.4 COUNTERS
9.5 MASTER CONTROL RELAYS (MCRs)
9.6 INTERNAL RELAYS
9.7 DESIGN CASES
9.7.1 Basic Counters And Timers
9.7.2 More Timers And Counters
9.7.3 Deadman Switch
9.7.4 Conveyor
9.7.5 Accept/Reject Sorting
9.7.6 Shear Press
9.8 SUMMARY
9.9 PRACTICE PROBLEMS
9.10 PRACTICE PROBLEM SOLUTIONS
9.11 ASSIGNMENT PROBLEMS

10. STRUCTURED LOGIC DESIGN
10.1 INTRODUCTION
10.2 PROCESS SEQUENCE BITS
10.3 TIMING DIAGRAMS
10.4 DESIGN CASES
10.5 SUMMARY
10.6 PRACTICE PROBLEMS
10.7 PRACTICE PROBLEM SOLUTIONS
10.8 ASSIGNMENT PROBLEMS

11. FLOWCHART BASED DESIGN
11.1 INTRODUCTION
11.2 BLOCK LOGIC
11.3 SEQUENCE BITS
11.4 SUMMARY
11.5 PRACTICE PROBLEMS
11.6 PRACTICE PROBLEM SOLUTIONS
11.7 ASSIGNMENT PROBLEMS

12. STATE BASED DESIGN
12.1 INTRODUCTION
12.1.1 State Diagram Example
12.1.2 Conversion to Ladder Logic
Block Logic Conversion
State Equations
State-Transition Equations
12.2 SUMMARY
12.3 PRACTICE PROBLEMS
12.4 PRACTICE PROBLEM SOLUTIONS
12.5 ASSIGNMENT PROBLEMS

13. NUMBERS AND DATA
13.1 INTRODUCTION
13.2 NUMERICAL VALUES
13.2.1 Binary
Boolean Operations
Binary Mathematics
13.2.2 Other Base Number Systems
13.2.3 BCD (Binary Coded Decimal)
13.3 DATA CHARACTERIZATION
13.3.1 ASCII (American Standard Code for Information Interchange)
13.3.2 Parity
13.3.3 Checksums
13.3.4 Gray Code
13.4 SUMMARY
13.5 PRACTICE PROBLEMS
13.6 PRACTICE PROBLEM SOLUTIONS
13.7 ASSIGNMENT PROBLEMS

14. PLCMEMORY
14.1 INTRODUCTION
14.2 MEMORY ADDRESSES
14.3 PROGRAM FILES
14.4 DATA FILES
14.4.1 User Bit Memory
14.4.2 Timer Counter Memory
14.4.3 PLC Status Bits (for PLC-5s and Micrologix)
14.4.4 User Function Control Memory
14.4.5 Integer Memory
14.4.6 Floating Point Memory
14.5 SUMMARY
14.6 PRACTICE PROBLEMS
14.7 PRACTICE PROBLEM SOLUTIONS
14.8 ASSIGNMENT PROBLEMS

15. LADDER LOGIC FUNCTIONS
15.1 INTRODUCTION
15.2 DATA HANDLING
15.2.1 Move Functions
15.2.2 Mathematical Functions
15.2.3 Conversions
15.2.4 Array Data Functions
Statistics
Block Operations
15.3 LOGICAL FUNCTIONS
15.3.1 Comparison of Values
15.3.2 Boolean Functions
15.4 DESIGN CASES
15.4.1 Simple Calculation
15.4.2 For-Next
15.4.3 Series Calculation
15.4.4 Flashing Lights
15.5 SUMMARY
15.6 PRACTICE PROBLEMS
15.7 PRACTICE PROBLEM SOLUTIONS
15.8 ASSIGNMENT PROBLEMS

16. ADVANCED LADDER LOGIC FUNCTIONS
16.1 INTRODUCTION
16.2 LIST FUNCTIONS
16.2.1 Shift Registers
16.2.2 Stacks
16.2.3 Sequencers
16.3 PROGRAM CONTROL
16.3.1 Branching and Looping
16.3.2 Fault Detection and Interrupts
16.4 INPUT AND OUTPUT FUNCTIONS
16.4.1 Immediate I/O Instructions
16.4.2 Block Transfer Functions
16.5 DESIGN TECHNIQUES
16.5.1 State Diagrams
16.6 DESIGN CASES
16.6.1 If-Then
16.6.2 Traffic Light
16.7 SUMMARY
16.8 PRACTICE PROBLEMS
16.9 PRACTICE PROBLEM SOLUTIONS
16.10 ASSIGNMENT PROBLEMS

17. OPEN CONTROLLERS
17.1 INTRODUCTION
17.2 IEC 61131
17.3 OPEN ARCHITECTURE CONTROLLERS
17.4 SUMMARY
17.5 PRACTICE PROBLEMS
17.6 PRACTICE PROBLEM SOLUTIONS
17.7 ASSIGNMENT PROBLEMS

18. INSTRUCTION LIST PROGRAMMING
18.1 INTRODUCTION
18.2 THE IEC 61131 VERSION
18.3 THE ALLEN-BRADLEY VERSION
18.4 SUMMARY
18.5 PRACTICE PROBLEMS
18.6 PRACTICE PROBLEM SOLUTIONS
18.7 ASSIGNMENT PROBLEMS

19. STRUCTURED TEXT PROGRAMMING
19.1 INTRODUCTION
19.2 THE LANGUAGE
19.3 SUMMARY
19.4 PRACTICE PROBLEMS
19.5 PRACTICE PROBLEM SOLUTIONS
19.6 ASSIGNMENT PROBLEMS

20. SEQUENTIAL FUNCTION CHARTS
20.1 INTRODUCTION
20.2 A COMPARISON OF METHODS
20.3 SUMMARY
20.4 PRACTICE PROBLEMS
20.5 PRACTICE PROBLEM SOLUTIONS
20.6 ASSIGNMENT PROBLEMS

21. FUNCTION BLOCK PROGRAMMING
21.1 INTRODUCTION
21.2 CREATING FUNCTION BLOCKS
21.3 DESIGN CASE
21.4 SUMMARY
21.5 PRACTICE PROBLEMS
21.6 PRACTICE PROBLEM SOLUTIONS
21.7 ASSIGNMENT PROBLEMS

22. ANALOG INPUTS AND OUTPUTS
22.1 INTRODUCTION
22.2 ANALOG INPUTS
22.2.1 Analog Inputs With a PLC
22.3 ANALOG OUTPUTS
22.3.1 Analog Outputs With A PLC
22.3.2 Pulse Width Modulation (PWM) Outputs
22.3.3 Shielding
22.4 DESIGN CASES
22.4.1 Process Monitor
22.5 SUMMARY
22.6 PRACTICE PROBLEMS
22.7 PRACTICE PROBLEM SOLUTIONS
22.8 ASSIGNMENT PROBLEMS

23. CONTINUOUS SENSORS
23.1 INTRODUCTION
23.2 INDUSTRIAL SENSORS
23.2.1 Angular Displacement
Potentiometers
23.2.2 Encoders
Tachometers
23.2.3 Linear Position
Potentiometers
Linear Variable Differential Transformers (LVDT)
Moire Fringes
Accelerometers
23.2.4 Forces and Moments
Strain Gages
Piezoelectric
23.2.5 Liquids and Gases
Pressure
Venturi Valves
Coriolis Flow Meter
Magnetic Flow Meter
Ultrasonic Flow Meter
Vortex Flow Meter
Positive Displacement Meters
Pitot Tubes
23.2.6 Temperature
Resistive Temperature Detectors (RTDs)
Thermocouples
Thermistors
Other Sensors
23.2.7 Light
Light Dependant Resistors (LDR)
23.2.8 Chemical
pH
Conductivity
23.2.9 Others
23.3 INPUT ISSUES
23.4 SENSOR GLOSSARY
23.5 SUMMARY
23.6 REFERENCES
23.7 PRACTICE PROBLEMS
23.8 PRACTICE PROBLEM SOLUTIONS
23.9 ASSIGNMENT PROBLEMS

24. CONTINUOUS ACTUATORS
24.1 INTRODUCTION
24.2 ELECTRIC MOTORS
24.2.1 Basic Brushed DC Motors
24.2.2 AC Motors
24.2.3 Brushless DC Motors
24.2.4 Stepper Motors
24.2.5 Wound Field Motors
24.3 HYDRAULICS
24.4 OTHER SYSTEMS
24.5 SUMMARY
24.6 PRACTICE PROBLEMS
24.7 PRACTICE PROBLEM SOLUTIONS
24.8 ASSIGNMENT PROBLEMS

25. CONTINUOUS CONTROL
25.1 INTRODUCTION
25.2 CONTROL OF LOGICAL ACTUATOR SYSTEMS
25.3 CONTROL OF CONTINUOUS ACTUATOR SYSTEMS
25.3.1 Block Diagrams
25.3.2 Feedback Control Systems
25.3.3 Proportional Controllers
25.3.4 PID Control Systems
25.4 DESIGN CASES
25.4.1 Oven Temperature Control
25.4.2 Water Tank Level Control
25.5 SUMMARY
25.6 PRACTICE PROBLEMS
25.7 PRACTICE PROBLEM SOLUTIONS
25.8 ASSIGNMENT PROBLEMS

26. FUZZY LOGIC
26.1 INTRODUCTION
26.2 COMMERCIAL CONTROLLERS
26.3 REFERENCES
26.4 SUMMARY
26.5 PRACTICE PROBLEMS
26.6 PRACTICE PROBLEM SOLUTIONS
26.7 ASSIGNMENT PROBLEMS

27. SERIAL COMMUNICATION
27.1 INTRODUCTION
27.2 SERIAL COMMUNICATIONS
27.2.1 RS-232
ASCII Functions
27.3 PARALLEL COMMUNICATIONS
27.4 DESIGN CASES
27.4.1 PLC Interface To a Robot
27.5 SUMMARY
27.6 PRACTICE PROBLEMS
27.7 PRACTICE PROBLEM SOLUTIONS
27.8 ASSIGNMENT PROBLEMS

28. NETWORKING
28.1 INTRODUCTION
28.1.1 Topology
28.1.2 OSI Network Model
28.1.3 Networking Hardware
28.1.4 Control Network Issues
28.2 NETWORK STANDARDS
28.2.1 Devicenet
28.2.2 CANbus
28.2.3 Controlnet
28.2.4 Ethernet
28.2.5 Profibus
28.2.6 Sercos
28.3 PROPRIETARY NETWORKS
28.3.1 Data Highway
28.4 NETWORK COMPARISONS
28.5 DESIGN CASES
28.5.1 Devicenet
28.6 SUMMARY
28.7 PRACTICE PROBLEMS
28.8 PRACTICE PROBLEM SOLUTIONS
28.9 ASSIGNMENT PROBLEMS

29. INTERNET
29.1 INTRODUCTION
29.1.1 Computer Addresses
IPV6
29.1.2 Phone Lines
29.1.3 Mail Transfer Protocols
29.1.4 FTP - File Transfer Protocol
29.1.5 HTTP - Hypertext Transfer Protocol
29.1.6 Novell
29.1.7 Security
Firewall
IP Masquerading
29.1.8 HTML - Hyper Text Markup Language
29.1.9 URLs
29.1.10 Encryption
29.1.11 Compression
29.1.12 Clients and Servers
29.1.13 Java
29.1.14 Javascript
29.1.15 CGI
29.1.16 ActiveX
29.1.17 Graphics
29.2 DESIGN CASES
29.2.1 Remote Monitoring System
29.3 SUMMARY
29.4 PRACTICE PROBLEMS
29.5 PRACTICE PROBLEM SOLUTIONS
29.6 ASSIGNMENT PROBLEMS

30. HUMANMACHINE INTERFACES (HMI)
30.1 INTRODUCTION
30.2 HMI/MMI DESIGN
30.3 DESIGN CASES
30.4 SUMMARY
30.5 PRACTICE PROBLEMS
30.6 PRACTICE PROBLEM SOLUTIONS
30.7 ASSIGNMENT PROBLEMS

31. ELECTRICAL DESIGN AND CONSTRUCTION
31.1 INTRODUCTION
31.2 ELECTRICAL WIRING DIAGRAMS
31.2.1 Selecting Voltages
31.2.2 Grounding
31.2.3 Wiring
31.2.4 Suppressors
31.2.5 PLC Enclosures
31.2.6 Wire and Cable Grouping
31.3 FAIL-SAFE DESIGN
31.4 SAFETY RULES SUMMARY
31.5 REFERENCES
31.6 SUMMARY
31.7 PRACTICE PROBLEMS
31.8 PRACTICE PROBLEM SOLUTIONS
31.9 ASSIGNMENT PROBLEMS

32. SOFTWARE ENGINEERING
32.1 INTRODUCTION
32.1.1 Fail Safe Design
32.2 DEBUGGING
32.2.1 Troubleshooting
32.2.2 Forcing
32.3 PROCESS MODELLING
32.4 PROGRAMMING FOR LARGE SYSTEMS
32.4.1 Developing a Program Structure
32.4.2 Program Verification and Simulation
32.5 DOCUMENTATION
32.6 COMMISIONING
32.7 REFERENCES
32.8 SUMMARY
32.9 PRACTICE PROBLEMS
32.10 PRACTICE PROBLEM SOLUTIONS
32.11 ASSIGNMENT PROBLEMS

33. SELECTING A PLC
33.1 INTRODUCTION
33.2 SPECIAL I/O MODULES
33.3 SUMMARY
33.4 PRACTICE PROBLEMS
33.5 PRACTICE PROBLEM SOLUTIONS
33.6 ASSIGNMENT PROBLEMS

34. FUNCTION REFERENCE
34.1 FUNCTION DESCRIPTIONS
34.1.1 General Functions
34.1.2 Program Control
34.1.3 Timers and Counters
34.1.4 Compare
34.1.5 Calculation and Conversion
34.1.6 Logical
34.1.7 Move
34.1.8 File
34.1.9 List
34.1.10 Program Control
34.1.11 Advanced Input/Output
34.1.12 String
34.2 DATA TYPES



384 pages | Academic Press (January 28, 2008) | ISBN: 0123725399 | PDF | 4 Mb
When choosing the technology options to develop a wireless sensor network (WSN), it is vital that their performance levels can be assessed for the type of application intended. This book describes the different technology options - MAC protocols, routing protocols, localisation and data fusion techniques - and provides the means to numerically measure their performance, whether by simulation, mathematical models or experimental test beds. Case studies, based on the authors' direct experience of implementing wireless sensor networks, describe the design methodology and the type of measurements used, together with samples of the performance measurements attained.
The book will enable you to answer vital questions such as:
* How long will my network remain alive given the amount of sensing required of it?
* For how long should I set the sleeping state of my motes?
* How many sensors should I distribute to meet the expected requirements of the application?
* What type of throughput should I expect as a function of the number of nodes deployed and the radio interface chosen (whether it be Bluetooth or Zigbee)?
* How is the Packet Error Rate of my Zigbee motes affected by the selection of adjacent frequency sub bands in the ISM 2.4GHz band?
* How is the localisation precision dependant on the number of nodes deployed in a corridor?
Communications and signal processing engineers, researchers and graduate students working in wireless sensor networks will find this book an invaluable practical guide to this important technology

Introduces students to the theory and practice of control systems engineering. Emphasizes the practical application of the subject to the analysis and design of feedback systems. Suitable for upper-division college and engineering students and self-study.


Click Thumbnail To Enlarge

Emphasizing the practical application of control systems engineering, the new Fourth Edition shows how to analyze and design real-world feedback control systems. Readers learn how to create control systems that support today's advanced technology and apply the latest computer methods to the analysis and design of control systems.
* A methodology with clearly defined steps is presented for each type of design problem.
* Continuous design examples give a realistic view of each stage in the control systems design process.
* A complete tutorial on using MATLAB Version 5 in designing control systems prepares readers to use this important software tool.

This free book of Control System Engineering are in NJVU extension file. NJVU is a similar or an alternative of .pdf file which is written based on open source.

Download Control System Engineering: 4th Edition now by clicking the hyperlink text.
Download complete solutions for tutorial's questions.

To be able open the file, please use NJVU viewer or download this STDU Viewer for free.
STDUviewer. Contains no virus, spyware, popup advertisement and trojan. Please don't hesitate.

STATE SPACE FROM TRANSFER FUNCTION

MATLAB can find the state space representation directly from the transfer function in two ways. To find the state space representation of the system from the numerator and denominator of the transfer function in the form

x' = Ax + Bu

y = Cx + Du

use MATLAB's tf2ss command:

[A, B, C, D] = tf2ss(num,den)

where num is the vector of the numerator polynomial coefficients, and den is the vector of the denominator polynomial coefficients.

In order to find the entire state space system in addition to the separate matrices from the transfer function, use the following command:

statespace = ss(transferfunction)

where transferfunction is the name of the transfer function system.

EXAMPLE

Find A, B, C, and D, the state space vectors of tutorial_tf using MATLAB:

>> [A, B, C, D] = tf2ss(num,den)

The MATLAB output will be:

A =
-2.5000 -1.5000
1.0000 0

B =
1
0

C =
0 0.5000

D =
0

Find the state space system of tutorial_tf using MATLAB:

>> tutorial_ss = ss(tutorial_tf)

MATLAB will assign the state space system under the name tutorial_ss, and output the following:


a =
x1 x2
x1 -2.5 -0.375
x2 4 0


b =
u1
x1 0.25
x2 0


c =
x1 x2
y1 0 0.5


d =
u1
y1 0

Continuous-time model.

BODE PLOT USING THE TRANSFER FUNCTION

MATLAB’s bode command plots the frequency response of a system as a bode plot. The syntax for the bode plot function in MATLAB is:

bode(transferfunction)

where transferfunction is the name of the transfer function system.

EXAMPLE

Find bode plot of the frequency response of the system tutorial_tf using MATLAB:

>> bode(tutorial_tf)

The MATLAB output will be the following bode plot of the frequency response:

IMPULSE RESPONSE USING THE TRANSFER FUNCTION

MATLAB can also plot the impulse response of a transfer function. Because the transfer function is in the form of output over input, the transfer function must be multiplied by the magnitude of the impulse. The syntax for plotting the impulse response is:

impulse(u * transferfunction)

where u is the magnitude of the impulse and transferfunction is the name of the transfer function of the system.

EXAMPLE

Find the impulse response of tutorial_tf with an input of u = 2 using MATLAB:

>> u = 2;

>> impulse(u * tutorial_tf)

The MATLAB output will be the following plot of the impulse response:

STEP RESPONSE USING THE TRANSFER FUNCTION

Once the transfer function is entered into MATLAB it is easy to calculate the response to a step input. To calculate the response to a unit step input, use:

step(transferfunction)

where transferfunction is the name of the transfer function of the system.

For steps with magnitude other than one, calculate the step response using:

step(u * transferfunction)

where u is the magnitude of the step and transferfunction is the name of the transfer function of the system.

EXAMPLE

Find the unit step response and the step response when u = 4 of tutorial_tf using MATLAB:

To find the unit step response:

>> step(tutorial_tf)

The MATLAB output will be the following plot of the unit step response:

To find the step response when u = 4:

>> u = 4;

>> step(u * tutorial_tf)

The MATLAB output will be the following plot of the step response:

HOW TO INPUT THE TRANSFER FUNCTION INTO MATLAB

In order to enter a transfer function into MATLAB, the variables much be given numerical value, because MATLAB cannot manipulate symbolic variables without the symbolic toolbox. Enter the numerator and denominator polynomial coefficients separately as vectors of coefficients of the individual polynomials in descending order. The syntax for defining a transfer function in MATLAB is:

transferfunction = tf(num, den)

where num is defined as the vector of numerator coefficients, and den is defined as the vector of denominator coefficients.

EXAMPLE

Input the transfer function X(s)/F(s) = 1/[ms2 + bs + k] into MATLAB:

For illustration purposes, this example uses m = 2, b = 5, and k = 3.

>> m = 2;
>> b = 5;
>> k = 3;
>> num = [ 1 ];
>> den = [ m b k ];
>> tutorial_tf = tf(num, den)

MATLAB will assign the transfer function under the name tutorial_tf, and output the following:

Transfer function:
1
---------------
2 s^2 + 5 s + 3

HOW TO FIND THE TRANSFER FUNCTION

In most cases the governing equation will be linear, consisting of a variable and its derivatives. The Laplace Transform allows a linear equation to be converted into a polynomial. The most useful property of the Laplace Transform for finding the transfer function is the differentiation theorem. Several properties are shown below:
Time Domain Frequency Domain
Linearity f(t) + g(t)
Function x(t)
1st Derivative x'(t)
2nd Derivative x"(t)
nth Derivative xn(t)

Note: While linearity allows Laplace Transforms to be added, the same does not hold true for multiplication. f(t)g(t) does not equal F(s)G(s). The solution to multiplication requires convolution, please refer to a differential equations book.

In order to convert the time dependent governing equation to the frequency domain, perform the Laplace Transform to the input and output functions and their derivatives. These transformed functions must then be substituted back into the governing equation assuming zero initial conditions. Because the transfer function is defined as the output Laplace function over the input Laplace function, rearrange the equation to fit this form.

EXAMPLE

Find the transfer function of the second order tutorial example problem:

From the free body diagram we were able to extract the following governing equation:

f(t) - kx - bx' - mx" = 0

The notation of the Laplace Transform operation is L{ }.

When finding the transfer function, ‘zero’ initial conditions must be assumed, so x(0) = x'(0) = 0.

Taking the Laplace Transform of the governing equation results in:

F(s) - k[X(s)] - b[sX(s)] - m[s2X(s)] = 0

Collecting all the terms involving X(s) and factoring leads to:

[ms2 + bs + k] X(s) = F(s)

The transfer function is defined as the output Laplace Transform over the input Laplace Transform, and so the transfer function of this second order system is:

X(s)/F(s) = 1/[ms2 + bs + k]

The modeling equation gathered from the free body diagram is in the time domain. Some analysis are easier to perform in the frequency domain. In order to convert to the frequency domain, apply the Laplace Transform to determine the transfer function of the system.

The Laplace Transform converts linear differential equations into algebraic expressions which are easier to manipulate. The Laplace Transform converts functions with a real dependent variable (such as time) into functions with a complex dependent variable (such as frequency, often represented by s).

The transfer function is the ratio of the output Laplace Transform to the input Laplace Transform assuming zero initial conditions. Many important characteristics of dynamic or control systems can be determined from the transfer function.

The general procedure to find the transfer function of a linear differential equation from input to output is to take the Laplace Transforms of both sides assuming zero conditions, and to solve for the ratio of the output Laplace over the input Laplace.

Key matlab commands used in these tutorial are bode, nyquist, nyquist1, lnyquist1, margin, lsim, step, and cloop


The frequency response method may be less intuitive than other methods you have studied previously. However, it has certain advantages, especially in real-life situations such as modeling transfer functions from physical data.

The frequency response of a system can be viewed two different ways: via the Bode plot or via the Nyquist diagram. Both methods display the same information; the difference lies in the way the information is presented. We will study both methods in this tutorial.

The frequency response is a representation of the system's response to sinusoidal inputs at varying frequencies. The output of a linear system to a sinusoidal input is a sinusoid of the same frequency but with a different magnitude and phase. The frequency response is defined as the magnitude and phase differences between the input and output sinusoids. In this tutorial, we will see how we can use the open-loop frequency response of a system to predict its behavior in closed-loop.

To plot the frequency response, we create a vector of frequencies (varying between zero or "DC" and infinity) and compute the value of the plant transfer function at those frequencies. If G(s) is the open loop transfer function of a system and w is the frequency vector, we then plot G(j*w) vs. w. Since G(j*w) is a complex number, we can plot both its magnitude and phase (the Bode plot) or its position in the complex plane (the Nyquist plot). More information is available on plotting the frequency response.

Bode Plots

As noted above, a Bode plot is the representation of the magnitude and phase of G(j*w) (where the frequency vector w contains only positive frequencies). To see the Bode plot of a transfer function, you can use the Matlab bode command. For example,
 bode(50,[1 9 30 40])
displays the Bode plots for the transfer function:
  50
-----------------------
s^3 + 9 s^2 + 30 s + 40

Please note the axes of the figure. The frequency is on a logarithmic scale, the phase is given in degrees, and the magnitude is given as the gain in decibels.

Note: a decibel is defined as 20*log10 ( |G(j*w| )

Click here to see a few simple Bode plots.

Gain and Phase Margin

Let's say that we have the following system:

where K is a variable (constant) gain and G(s) is the plant under consideration. The gain margin is defined as the change in open loop gain required to make the system unstable. Systems with greater gain margins can withstand greater changes in system parameters before becoming unstable in closed loop.

Keep in mind that unity gain in magnitude is equal to a gain of zero in dB.

The phase margin is defined as the change in open loop phase shift required to make a closed loop system unstable.

The phase margin also measures the system's tolerance to time delay. If there is a time delay greater than 180/Wpc in the loop (where Wpc is the frequency where the phase shift is 180 deg), the system will become unstable in closed loop. The time delay can be thought of as an extra block in the forward path of the block diagram that adds phase to the system but has no effect the gain. That is, a time delay can be represented as a block with magnitude of 1 and phase w*time_delay (in radians/second).

For now, we won't worry about where all this comes from and will concentrate on identifying the gain and phase margins on a Bode plot:

The phase margin is the difference in phase between the phase curve and -180 deg at the point corresponding to the frequency that gives us a gain of 0dB (the gain cross over frequency, Wgc). Likewise, the gain margin is the difference between the magnitude curve and 0dB at the point corresponding to the frequency that gives us a phase of -180 deg (the phase cross over frequency, Wpc).

One nice thing about the phase margin is that you don't need to replot the Bode in order to find the new phase margin when changing the gains. If you recall, adding gain only shifts the magnitude plot up. This is the equivalent of changing the y-axis on the magnitude plot. Finding the phase margin is simply the matter of finding the new cross-over frequency and reading off the phase margin. For example, suppose you entered the command bode(50,[1 9 30 40]). You will get the following bode plot:

You should see that the phase margin is about 100 degrees. Now suppose you added a gain of 100, by entering the command bode(100*50,[1 9 30 40]). You should get the following plot (note I changed the axis so the scale would be the same as the plot above, your bode plot may not be exactly the same shape, depending on the scale used):

As you can see the phase plot is exactly the same as before, and the magnitude plot is shifted up by 40dB (gain of 100). The phase margin is now about -60 degrees. This same result could be achieved if the y-axis of the magnitude plot was shifted down 40dB. Try this, look at the first Bode plot, find where the curve crosses the -40dB line, and read off the phase margin. It should be about -60 degrees, the same as the second Bode plot.

We can find the gain and phase margins for a system directly, by using Matlab. Just enter the margin command. This command returns the gain and phase margins, the gain and phase cross over frequencies, and a graphical representation of these on the Bode plot. Let's check it out:

 margin(50,[1 9 30 40])

Bandwidth Frequency

The bandwidth frequency is defined as the frequency at which the closed-loop magnitude response is equal to -3 dB. However, when we design via frequency response, we are interested in predicting the closed-loop behavior from the open-loop response. Therefore, we will use a second-order system approximation and say that the bandwidth frequency equals the frequency at which the open-loop magnitude response is between -6 and - 7.5dB, assuming the open loop phase response is between -135 deg and -225 deg. For a complete derivation of this approximation, consult your textbook.

If you would like to see how the bandwidth of a system can be found mathematically from the closed-loop damping ratio and natural frequency, the relevant equations as well as some plots and Matlab code are given on our Bandwidth Frequency page.

In order to illustrate the importance of the bandwidth frequency, we will show how the output changes with different input frequencies. We will find that sinusoidal inputs with frequency less than Wbw (the bandwidth frequency) are tracked "reasonably well" by the system. Sinusoidal inputs with frequency greater than Wbw are attenuated (in magnitude) by a factor of 0.707 or greater (and are also shifted in phase).

Let's say that we have the following closed-loop transfer function representing a system:


1
---------------
s^2 + 0.5 s + 1
First of all, let's find the bandwidth frequency by looking at the Bode plot:
bode (1, [1 0.5 1 ])

Since this is the closed-loop transfer function, our bandwidth frequency will be the frequency corresponding to a gain of -3 dB. looking at the plot, we find that it is approximately 1.4 rad/s. We can also read off the plot that for an input frequency of 0.3 radians, the output sinusoid should have a magnitude about one and the phase should be shifted by perhaps a few degrees (behind the input). For an input frequency of 3 rad/sec, the output magnitude should be about -20dB (or 1/10 as large as the input) and the phase should be nearly -180 (almost exactly out-of-phase). We can use the lsim command to simulate the response of the system to sinusoidal inputs.

First, consider a sinusoidal input with a frequency lower than Wbw. We must also keep in mind that we want to view the steady state response. Therefore, we will modify the axes in order to see the steady state response clearly (ignoring the transient response).

 w= 0.3;
num = 1;
den = [1 0.5 1 ];
t=0:0.1:100;
u = sin(w*t);
[y,x] = lsim(num,den,u,t);
plot(t,y,t,u)
axis([50,100,-2,2])

Note that the output (blue) tracks the input (purple) fairly well; it is perhaps a few degrees behind the input as expected.

However, if we set the frequency of the input higher than the bandwidth frequency for the system, we get a very distorted response (with respect to the input):


w = 3;
num = 1;
den = [1 0.5 1 ];
t=0:0.1:100;
u = sin(w*t);
[y,x] = lsim(num,den,u,t);
plot(t,y,t,u)
axis([90, 100, -1, 1])

Again, note that the magnitude is about 1/10 that of the input, as predicted, and that it is almost exactly out of phase (180 degrees behind) the input. Feel free to experiment and view the response for several different frequencies w, and see if they match the Bode plot.

Closed-loop performance

In order to predict closed-loop performance from open-loop frequency response, we need to have several concepts clear:
  • The system must be stable in open loop if we are going to design via Bode plots.
  • If the gain cross over frequency is less than the phase cross over frequency(i.e. Wgc <>
  • For second-order systems, the closed-loop damping ratio is approximately equal to the phase margin divided by 100 if the phase margin is between 0 and 60 deg. We can use this concept with caution if the phase margin is greater than 60 deg.
  • For second-order systems, a relationship between damping ratio, bandwidth frequency and settling time is given by an equation described on the bandwidth page.
  • A very rough estimate that you can use is that the bandwidth is approximately equal to the natural frequency.
Let's use these concepts to design a controller for the following system:

Where Gc(s) is the controller and G(s) is:

  10
----------
1.25s + 1

The design must meet the following specifications:
  • Zero steady state error.
  • Maximum overshoot must be less than 40%.
  • Settling time must be less than 2 secs.
There are two ways of solving this problem: one is graphical and the other is numerical. Within Matlab, the graphical approach is best, so that is the approach we will use. First, let's look at the Bode plot. Create an m-file with the following code:
num = 10;
den = [1.25,1];
bode(num, den)
There are several several characteristics of the system that can be read directly from this Bode plot. First of all, we can see that the bandwidth frequency is around 10 rad/sec. Since the bandwidth frequency is roughly the same as the natural frequency (for a second order system of this type), the rise time is 1.8/BW=1.8/10=1.8 seconds. This is a rough estimate, so we will say the rise time is about 2 seconds.

The phase margin for this system is approximately 95 degrees. This corresponds to a damping of PM/100=95/100=0.95. Plugging in this value into the equation relating overshoot and the damping ratio (or consulting a plot of this relation), we find that the damping ratio corresponding to this overshoot is approximately 1%. The system will be close to being overdamped.

The last major point of interest is steady-state error. The steady-state error can be read directly off the Bode plot as well. The constant (Kp, Kv, or Ka) are located at the intersection of the low frequency asymptote with the w=1 line. Just extend the low frequency line to the w=1 line. The magnitude at this point is the constant. Since the Bode plot of this system is a horizontal line at low frequencies (slope = 0), we know this system is of type zero. Therefore, the intersection is easy to find. The gain is 20dB (magnitude 10). What this means is that the constant for the error function it 10. Click here to see the table of system types and error functions. The steady-state error is 1/(1+Kp)=1/(1+10)=0.091. If our system was type one instead of type zero, the constant for the steady-state error would be found in a manner similar to the following

Let's check our predictions by looking at a step response plot. This can be done by adding the following two lines of code into the Matlab command window.

    [numc,denc] = cloop(num,den,-1);
    step(numc,denc)

As you can see, our predictions were very good. The system has a rise time of about 2 seconds, is overdamped, and has a steady-state error of about 9%. Now we need to choose a controller that will allow us to meet the design criteria. We choose a PI controller because it will yield zero steady state error for a step input. Also, the PI controller has a zero, which we can place. This gives us additional design flexibility to help us meet our criteria. Recall that a PI controller is given by:


K*(s+a)
Gc(s) = -------
s
The first thing we need to find is the damping ratio corresponding to a percent overshoot of 40%. Plugging in this value into the equation relating overshoot and damping ratio (or consulting a plot of this relation), we find that the damping ratio corresponding to this overshoot is approximately 0.28. Therefore, our phase margin should be approximately 30 degrees. From our Ts*Wbw vs damping ratio plot, we find that Ts*Wbw ~ 21. We must have a bandwidth frequency greater than or equal to 12 if we want our settling time to be less than 1.75 seconds which meets the design specs.

Now that we know our desired phase margin and bandwidth frequency, we can start our design. Remember that we are looking at the open-loop Bode plots. Therefore, our bandwidth frequency will be the frequency corresponding to a gain of approximately -7 dB.

Let's see how the integrator portion of the PI or affects our response. Change your m-file to look like the following (this adds an integral term but no proportional term):

num = [10];
den = [1.25, 1];
numPI = [1];
denPI = [1 0];
newnum = conv(num,numPI);
newden = conv(den,denPI);
bode(newnum, newden, logspace(0,2))

Our phase margin and bandwidth frequency are too small. We will add gain and phase with a zero. Let's place the zero at 1 for now and see what happens. Change your m-file to look like the following:

num = [10];
den = [1.25, 1];
numPI = [1 1];
denPI = [1 0];
newnum = conv(num,numPI);
newden = conv(den,denPI);
bode(newnum, newden, logspace(0,2))

It turns out that the zero at 1 with a unit gain gives us a satisfactory answer. Our phase margin is greater than 60 degrees (even less overshoot than expected) and our bandwidth frequency is approximately 11 rad/s, which will give us a satisfactory response. Although satisfactory, the response is not quite as good as we would like. Therefore, let's try to get a higher bandwidth frequency without changing the phase margin too much. Let's try to increase the gain to 5 and see what happens .This will make the gain shift and the phase will remain the same.

num = [10];
den = [1.25, 1];
numPI = 5*[1 1];
denPI = [1 0];
newnum = conv(num,numPI);
newden = conv(den,denPI);
bode(newnum, newden, logspace(0,2))

That looks really good. Let's look at our step response and verify our results. Add the following two lines to your m-file:

[clnum,clden] =cloop(newnum,newden,-1);
step(clnum,clden)

As you can see, our response is better than we had hoped for. However, we are not always quite as lucky and usually have to play around with the gain and the position of the poles and/or zeros in order to achieve our design requirements.

This tutorial is continued on the Nyquist page (the link is after the feedback form).



Laplace Transform

The Laplace transform is an integral transform perhaps second only to the Fourier transform in its utility in solving physical problems. The Laplace transform is particularly useful in solving linear ordinary differential equations such as those arising in the analysis of electronic circuits.

The (unilateral) Laplace transform L (not to be confused with the Lie derivative, also commonly denoted L) is defined by

 L_t[f(t)](s)=int_0^inftyf(t)e^(-st)dt,
(1)

where f(t) is defined for =0" width="27" border="0" height="14"> (Abramowitz and Stegun 1972). The unilateral Laplace transform is almost always what is meant by "the" Laplace transform, although a bilateral Laplace transform is sometimes also defined as

 L_t^((2))[f(t)](s)=int_(-infty)^inftyf(t)e^(-st)dt
(2)

(Oppenheim et al. 1997). The unilateral Laplace transform L_t[f(t)](s) is implemented in Mathematica as LaplaceTransform[f[t], t, s].

The inverse Laplace transform is known as the Bromwich integral, sometimes known as the Fourier-Mellin integral (see also the related Duhamel's convolution principle).

A table of several important one-sided Laplace transforms is given below.

fL_t[f(t)](s)conditions
11/s
t1/(s^2)
t^n(n!)/(s^(n+1))=0" width="57" border="0" height="14">
t^a(Gamma(a+1))/(s^(a+1))-1" width="62" border="0" height="14">
e^(at)1/(s-a)
cos(omegat)s/(s^2+omega^2)omega in R
sin(omegat)a/(s^2+omega^2)|I[omega]|" width="54" border="0" height="14">
cosh(omegat)s/(s^2-omega^2)|R[omega]|" width="59" border="0" height="14">
sinh(omegat)a/(s^2-omega^2)|I[omega]|" width="54" border="0" height="14">
e^(at)sin(bt)b/((s-a)^2+b^2)a+|I[b]|" width="73" border="0" height="14">
e^(at)cos(bt)(s-a)/((s-a)^2+b^2)b in R
delta(t-c)e^(-cs)
H_c(t)0" width="111" border="0" height="59">
J_0(t)1/(sqrt(s^2+1))
J_n(at)((sqrt(s^2+a^2)-s)^n)/(a^nsqrt(s^2+a^2))=0" width="57" border="0" height="14">

In the above table, J_0(t) is the zeroth-order Bessel function of the first kind, delta(t) is the delta function, and H_c(t) is the Heaviside step function.

The Laplace transform has many important properties. The Laplace transform existence theorem states that, if f(t) is piecewise continuous on every finite interval in [0,infty) satisfying

 |f(t)|<=Me^(at)
(3)

for all t in [0,infty), then L_t[f(t)](s) exists for all a" width="29" border="0" height="14">. The Laplace transform is also unique, in the sense that, given two functions F_1(t) and F_2(t) with the same transform so that

 L_t[F_1(t)](s)=L_t[F_2(t)](s)=f(s),
(4)

then Lerch's theorem guarantees that the integral

 int_0^aN(t)dt=0
(5)

vanishes for all 0" width="30" border="0" height="14"> for a null function defined by

 N(t)=F_1(t)-F_2(t).
(6)

The Laplace transform is linear since

L_t[af(t)+bg(t)]=int_0^infty[af(t)+bg(t)]e^(-st)dt
(7)
=aint_0^inftyfe^(-st)dt+bint_0^inftyge^(-st)dt
(8)
=aL_t[f(t)]+bL_t[g(t)].
(9)

The Laplace transform of a convolution is given by

L_t[f(t)*g(t)]=L_t[f(t)]L_t[g(t)]
(10)
L_t^(-1)[FG]=L_t^(-1)[F]*L_t^(-1)[G].
(11)

Now consider differentiation. Let f(t) be continuously differentiable n-1 times in [0,infty). If |f(t)|<=Me^(at), then

 L_t[f^((n))(t)](s)=s^nL_t[f(t)]-s^(n-1)f(0)-s^(n-2)f^'(0)-...-f^((n-1))(0).
(12)

This can be proved by integration by parts,

L_t[f^'(t)](s)=infty)int_0^ae^(-st)f^'(t)dt" width="112" border="0" height="35">
(13)
=infty){[e^(-st)f(t)]_0^a+sint_0^ae^(-st)f(t)dt}" width="209" border="0" height="35">
(14)

(15)
=infty)[e^(-sa)f(a)-f(0)+sint_0^ae^(-st)f(t)dt]" width="235" border="0" height="35">
(16)

(17)
=sL_t[f(t)]-f(0).
(18)

Continuing for higher-order derivatives then gives

 L_t[f^('')(t)](s)=s^2L_t[f(t)](s)-sf(0)-f^'(0).
(19)

This property can be used to transform differential equations into algebraic equations, a procedure known as the Heaviside calculus, which can then be inverse transformed to obtain the solution. For example, applying the Laplace transform to the equation

 f^('')(t)+a_1f^'(t)+a_0f(t)=0
(20)

gives

 {s^2L_t[f(t)](s)-sf(0)-f^'(0)}+a_1{sL_t[f(t)](s)-f(0)}+a_0L_t[f(t)](s)=0
(21)
 L_t[f(t)](s)(s^2+a_1s+a_0)-sf(0)-f^'(0)-a_1f(0)=0,
(22)

which can be rearranged to

 L_t[f(t)](s)=(sf(0)+f^'(0)+a_1f(0))/(s^2+a_1s+a_0).
(23)

If this equation can be inverse Laplace transformed, then the original differential equation is solved.

The Laplace transform satisfied a number of useful properties. Consider exponentiation. If L_t[f(t)](s)=F(s) for alpha" width="30" border="0" height="14"> (i.e., F(s) is the Laplace transform of f), then L_t[e^(at)f](s)=F(s-a) for a+alpha" width="52" border="0" height="14">. This follows from

F(s-a)=int_0^inftyfe^(-(s-a)t)dt
(24)
=int_0^infty[f(t)e^(at)]e^(-st)dt
(25)
=L_t[e^(at)f(t)](s).
(26)

The Laplace transform also has nice properties when applied to integrals of functions. If f(t) is piecewise continuous and |f(t)|<=Me^(at), then

 L_t[int_0^tf(t^')dt^']=1/sL_t[f(t)](s).
(27)

SEE ALSO: Bilateral Laplace Transform, Bromwich Integral, Fourier-Mellin Integral, Fourier Transform, Integral Transform, Laplace-Stieltjes Transform, Operational Mathematics, Unilateral Laplace Transform

UTeM BMFR Blog Directories

UTeM BMFR MyBlogLog