EE4107 Cybernetics Advanced Faculty of Technology, Postboks 203, Kjølnes ring 56, N-3901 Porsgrunn, Norway. Tel: +47 35 57 50 00 Fax: +47 35 57 54 01 Exercise 1a: Transfer functions (Solutions) Transfer functions Transfer functions are a model form based on the Laplace transform. Transfer functions are very useful in analysis and design of linear dynamic systems. A general Transfer function is on the form: = () () Where is the output and is the input. A general transfer function can be written on the following general form: = () () = ! ! + !!! !!! + ⋯ + ! + ! ! ! + !!! !!! + ⋯ + ! + ! The Numerators of transfer function models describe the locations of the zeros of the system, while the Denominators of transfer function models describe the locations of the poles of the system. Differential Equations While the transfer function gives an external inout representation of a system, will the differential equations of a system give an internal representation of a system. We can find the transfer function from the differential equation by using Laplace and Laplace transformation pairs. Likewise, we can find the differential equation from the transfer function using inverse Laplace. The following transformation pair is much used: Differentiation: 1.order systems: ⟺ () For higher order systems: (!) ⟺ ! ()
15
Embed
Exercise 1a: Transfer functions (Solutions)home.hit.no/~hansha/documents/subjects/EE4107/exercises...Title Microsoft Word - Exercise 1a - Transfer functions - Solutions.docx
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transfer functions are a model form based on the Laplace transform. Transfer functions are very useful in analysis and design of linear dynamic systems.
A general Transfer function is on the form:
𝐻 𝑆 =𝑦(𝑠)𝑢(𝑠)
Where 𝑦 is the output and 𝑢 is the input.
A general transfer function can be written on the following general form:
The Numerators of transfer function models describe the locations of the zeros of the system, while the Denominators of transfer function models describe the locations of the poles of the system.
Differential Equations
While the transfer function gives an external in-‐out representation of a system, will the differential equations of a system give an internal representation of a system.
We can find the transfer function from the differential equation by using Laplace and Laplace transformation pairs. Likewise, we can find the differential equation from the transfer function using inverse Laplace.
The following transformation pair is much used:
Differentiation:
1.order systems:
𝑥⟺ 𝑠𝑥(𝑠)
For higher order systems:
𝑥(!) ⟺ 𝑠!𝑥(𝑠)
2
EE4107 -‐ Cybernetics Advanced
Integration:
𝑥⟺1𝑠𝑥(𝑠)
Time-‐delay:
𝑢 𝑡 − 𝜏 ⟺ 𝑢(𝑠)𝑒!!"
Static Time-‐response
In some cases we want to find the constant value 𝑦! of the time response when the time 𝑡 → ∞.
We can then use the final value theorem (sluttverditeoremet):
𝑦! = lim!→!
𝑦 𝑡 = lim!→!
𝑠 ∙ 𝑦(𝑠)
MathScript
MathScript has several functions for creating transfer functions:
Function Description Example tf Creates system model in transfer function form. You also can
use this function to state-‐space models to transfer function form.
>num=[1]; >den=[1, 1, 1]; >H = tf(num, den)
Sys_order1 Constructs the components of a first-‐order system model based on a gain, time constant, and delay that you specify. You can use this function to create either a state-‐space model or a transfer function model, depending on the output parameters you specify.
>K = 1; >tau = 1; >H = sys_order1(K, tau)
Sys_order2 Constructs the components of a second-‐order system model based on a damping ratio and natural frequency you specify. You can use this function to create either a state-‐space model or a transfer function model, depending on the output parameters you specify.
step Creates a step response plot of the system model. You also can use this function to return the step response of the model outputs. If the model is in state-‐space form, you also can use this function to return the step response of the model states. This function assumes the initial model states are zero. If you do not specify an output, this function creates a plot.
The Numerators of transfer function models describe the locations of the zeros of the system, while the Denominators of transfer function models describe the locations of the poles of the system.
In MathScript we can define such a transfer function using the built-‐in tf function as follows:
num = [bm, bm_1, bm_2, … , b1, b0]; den = [an, an_1, an_2, … , a1, a0]; H = tf(num, den)
Task 1: Differential equations to Transfer functions
Task 1.1
Given the following differential equation:
𝑥 = −0.5𝑥 + 2𝑢
Find the following transfer function:
4
EE4107 -‐ Cybernetics Advanced
𝐻 𝑠 =𝑥(𝑠)𝑢(𝑠)
Solution:
Laplace gives:
𝑠𝑥(𝑠) = −0.5𝑥(𝑠) + 2𝑢(𝑠)
Further:
𝑠𝑥 𝑠 + 0.5𝑥(𝑠) = 2𝑢(𝑠)
Further:
𝑥 𝑠 (𝑠 + 0.5) = 2𝑢(𝑠)
Further:
𝑥 𝑠𝑢(𝑠)
=2
𝑠 + 0.5=
42𝑠 + 1
This gives:
𝐻 𝑠 =𝑥 𝑠𝑢(𝑠)
=4
2𝑠 + 1
Task 1.2
Given the following 2.order differential equation:
𝑦 + 𝑦 + 5𝑦 = 5𝑥
Find the following transfer function:
𝐻 𝑠 =𝑦(𝑠)𝑥(𝑠)
Solution:
We get:
𝑠!𝑦 𝑠 + 𝑠𝑦 𝑠 + 5𝑦 𝑠 = 5𝑠𝑥(𝑠)
Further:
𝑦 𝑠 [𝑠! + 𝑠 + 5] = 5𝑠𝑥(𝑠)
This gives the following transfer function:
𝑦 𝑠𝑥(𝑠)
=5𝑠
𝑠! + 𝑠 + 5
5
EE4107 -‐ Cybernetics Advanced
Task 2: Transfer functions to differential equatons
Given the following system:
𝐻 𝑠 =𝑥(𝑠)𝑢(𝑠)
=3
0.5𝑠 + 1
Task 2.1
Find the differential equation from the transfer function above.
Solution:
We get:
𝑥(𝑠) 0.5𝑠 + 1 = 3𝑢(𝑠)
Further: 0.5𝑠𝑥 𝑠 + 𝑥(𝑠) = 3𝑢(𝑠)
Inverse Laplace gives:
0.5𝑥 + 𝑥 = 3𝑢
This gives the following differential equation:
𝑥 = −2𝑥 + 6𝑢
Task 2.2
Draw a block diagram of the system.
Solution:
We can draw the following block diagram:
6
EE4107 -‐ Cybernetics Advanced
Note! Even when the system is in the time plane we normally use the symbol . Other symbols that
are commonly used for the integrator are: or
Task 3: 2.order system
Given the following transfer function:
𝐻 𝑠 =𝑦(𝑠)𝑢(𝑠)
=2𝑠 + 3
𝑠! + 4𝑠 + 3
Task 3.1
Find the differential equation for the system.
Solution:
We do as follows:
𝑦 𝑠 𝑠! + 4𝑠 + 3 = 𝑢 𝑠 [2𝑠 + 3]
This gives:
𝑠!𝑦 𝑠 + 4𝑠𝑦 𝑠 + 3𝑦 𝑠 = 2𝑠𝑢 𝑠 + 3𝑢(𝑠)
This gives the following differential equation:
𝑦 + 4𝑦 + 3𝑦 = 2𝑢 + 3𝑢
Note! We have used the rule:
𝑥(!) ⟺ 𝑠!𝑥(𝑠)
Task 4: Static Time-‐response
Task 4.1
Given the following system:
𝐻(𝑠) =𝑦(𝑠)𝑢(𝑠)
=3
2𝑠 + 1
Find the static time-‐response.
We will use a step for the control signal (𝑢 𝑡 = 1).
Note! The Laplace Transformation pair for a step is as follows:
7
EE4107 -‐ Cybernetics Advanced
1𝑠⇔ 1
Solution:
We have:
𝐻(𝑠) =𝑦(𝑠)𝑢(𝑠)
=3
2𝑠 + 1
Meaning that:
𝑦(𝑠) =3
2𝑠 + 1𝑢(𝑠)
where 𝑢 𝑠 = !!
This means:
𝑦 𝑠 =3
2𝑠 + 1∙1𝑠=
32𝑠 + 1 𝑠
Then we use the final value theorem (sluttverditeoremet):
𝑦! = lim!→!
𝑦 𝑡 = lim!→!
𝑠 ∙ 𝑦 𝑠 = lim!→!
𝑠3
2𝑠 + 1 𝑠= lim
!→!
32𝑠 + 1
=3
2 ∙ 0 + 1= 3
Task 4.2
Given the following system:
𝐻(𝑠) =𝑦(𝑠)𝑢(𝑠)
=6(𝑠 + 1)9𝑠 + 0.25
Find the static time-‐response.
We will use a step for the control signal (𝑢 𝑡 = 1).
Solution:
We get:
𝑦(𝑠) =6(𝑠 + 1)9𝑠 + 0.25
𝑢(𝑠)
where 𝑢 𝑠 = !!
This means:
𝑦 𝑠 =6(𝑠 + 1)9𝑠 + 0.25 𝑠
8
EE4107 -‐ Cybernetics Advanced
Then we get using the final value theorem:
𝑦! = lim!→!
𝑦 𝑡 = lim!→!
𝑠 ∙ 𝑦 𝑠 = lim!→!
𝑠6 𝑠 + 19𝑠 + 0.25 𝑠
= lim!→!
6(𝑠 + 1)9𝑠 + 0.25
=6(0 + 1)9 ∙ 0 + 0.25
=6
0.25= 24
Task 5: 1.order transfer functions
Given the following system:
𝐻(𝑠) =𝑦(𝑠)𝑢(𝑠)
=2
4𝑠 + 1
Task 5.1
What are the values for the gain 𝐾 and the time constant 𝑇 for this system?
Sketch the step response for the system using “pen and paper”.
Find the step response using MathScript and compare the result with your sketch.