None Notebook

This notebook contains material from CBE30338; content is available on Github.

< 5.0 Frequency Domain Control Design | Contents | Tag Index | 5.2 Closed-Loop Transfer Functions for Car Cruise Control >

Open in Colab

Download

5.1 Getting Started with Transfer Functions

The Python Control Systems Library provides basic tools for the analysis and design of linear feedback control systems. The library provides tools to specify transfer function and state space models, manipulate models using block diagram algebra, stability analysis, and perform time and frequency domain simulation.

The purpose of these notes is to provide a quick start with the Python Control Systems Library. Consult the Python Control Systems Documentation for more details.

5.1.1 Installation

The Python Control Systems Library is not, unfortunately, a standard part of most standard Python distributions. On most systems, the following commands will perform the required one-time installation of the necessary software.

5.1.2 Library Usage

The control systems library is designed to work with a simplified syntax where libraries are imported without the standard prefixes.

5.1.3 Demonstration

5.1.3.1 Step Response of Transfer Functions

The following cells demonstrate the use of two functions in the control systems library, tf and step. Suppose a signal $y(s)$ is related to an input $u(s)$ by the formula

$$y(s) = \underbrace{\frac{4.3}{3.2s + 1}}_{G(s)} u(s)$$

The transfer function

$$G(s) = \frac{4.3}{3.2 s + 1}$$

is represented in the control system libary using tf(num,den) where num and den list the coefficients of the numerator and denominator polynomials.

The step response is created and plotted as

5.1.3.2 Transfer Functions in Series

Models for complex systems are generally constructed by combining models of simpler elements. Consider, for example, a serial connection of two transfer functions

$$ y_1(s) = G_1(s) u(s)$$$$ y_2(s) = G_2(s) y_1(s)$$

which can be diagrammed as

$$u(s) \longrightarrow \boxed{\\G_1(s)} \stackrel{y_1(s)}{\longrightarrow} \boxed{\\G_2(s)} \longrightarrow y_2(s)$$

The serial composition of two transfer functions can be written

$$y_2(s) = \underbrace{G_2(s)G_1(s)}_{G(s)} u(s)$$

where the product $G(s) = G_2(s)G_1(s)$ represents the transfer function of the combined system. In terms of a block diagram

$$u(s) \longrightarrow \boxed{\\G_1(s)} \stackrel{y_1(s)}{\longrightarrow} \boxed{\\G_2(s)} \longrightarrow y_2(s) \qquad \implies \qquad u(s) \longrightarrow \boxed{\\G_2(s)G_1(s)} \longrightarrow y_2(s)$$

The product $G(s) = G_2(s)G_1(s)$$ is computed by taking the products of the numerator and denominator polynomials, respectively. For example, suppose

$$G_1(s) = \frac{12.3}{10 s + 1} \text{ and }G_2(s) = \frac{4}{15 s + 1}$$

Then

\begin{align*} G(s) & = G_2(s)G_1(s) \\ & = \frac{4}{15 s + 1} \times \frac{12.3}{10 s + 1} = \frac{4 \times 12.3}{(15s + 1)(10s + 1)} = \frac{49.2}{150 s^2 + 25s + 1} \end{align*}

We can verify this calculation using the control systems library.

5.1.3.3 Second Order Transfer Functions

The control systems library is particularly helpful when working with second and higher order transfer functions. For

$$G(s) = \frac{3}{4s^2 + s + 1}$$

< 5.0 Frequency Domain Control Design | Contents | Tag Index | 5.2 Closed-Loop Transfer Functions for Car Cruise Control >

Open in Colab

Download