ENGG1015 Homework 3 Question 1. ENGG1015: Homework 3


 Randolph Skinner
 3 months ago
 Views:
Transcription
1 ENGG0 Homewor Question ENGG0: Homewor Due: Dec, 0, :pm Instruction: Submit your answers electronically through Moodle (Lin to Homewor ) You may type your answers using any text editor of your choice, or you may submit a scanned copy of your hand written answer Acceptable file format: Text file (txt) OpenDocument file (odt) MS Word file (doc / docx) Portable Document File (pdf) Question Difference Equations Again In the previous homewor, we studied the difference equation y[n] = y[n ] + y[n ] + x[n] () with an impulse input and showed, without proof, that there is (liely) an analytical formula for y[n] In this exercise, you will derive this formula systematically Part(a) Derive the transfer function Y (z) of the system X(z) Computing the ztransform, Therefore, Y (z) = z Y (z) + z Y (z) + X(z) Y (z) X(z) = z z Part(b) Show that the poles are at ± Let the bigger one be r 0, and the smaller one be r The poles are the roots of the polynomial in the denominator In this case, applying the quadratic formula, the roots are ( ) ± ( ) 4()( ) () = ± Therefore, r 0 = + and r = EEE/ENGG0/0 () Page of 9
2 ENGG0 Homewor Question Part(c) Compute the partial fraction of the transfer function to turn it to a sum of two firstorder systems Let the partial fractions have coefficients A and B such that Thus, we need A r 0 z + B r z = A Ar z + B Br 0 z z z A + B = Ar + Br 0 = 0 Solving this simultaneous equation, we have Part(d) A = r 0 = + B = r = Show that, with x[n] = δ[n] (an impulse input), ( y[n] = + ) n+ ( ) n+ With an impulse input, y[n] = A(r 0 ) n + B(r ) n ( = + ) n+ ( ) n+ Part(e) The above difference equation, and the corresponding analytical expression, is nown as the Fibonacci sequence It occurs in certain biological settings in nature, such as branching in trees and the arrangement of leaves on a stem, as well as in mathematical constructions such as the Pascal s triangle The dominant pole, ϕ = +, is called the golden ratio There is a closely related Lucas number, defined for n 0 as if n = 0 L n = if n = L n + L n if n > Show that you can generate this sequence of numbers with a particular design of x[n] to the difference equation given in Eq () What is this x[n]? EEE/ENGG0/0 () Page of 9
3 ENGG0 Homewor Question Putting x[0] = in Eq () would give y[0] =, corresponding to L 0 For the next value, y[] = y[0] + x[], hence if we want y[] = L =, we need x[] = The other values of x[n] would be zero for n {0, }, so y[n] = y[n ] + y[n ] would correspond to L n = L n + L n Part(f) Maing use of the analytical formula for the Fibonacci sequence above, show that the analytical formula for the Lucas number is ( y[n] = + ) n+ ( ) n+ [( + ) n ( ) n ] ( + ) n ( ) n = + The input x[0] = would give a Fibonacci sequence where every number is multiplied by two The input x[] = would give another Fibonacci sequence where the sequence is delayed by one unit and is multiplied by negative one Combining the two, we have ( y[n] = + ) n+ ( ) n+ [( + ) n ( ) n ] ( + ) n ( ) n = + Question Complex Poles In the lecture, we considered the effect of a variable parameter in a twopole system We have only derived the case where the two poles are real; with the help of complex numbers, we can now consider other values that may lead to oscillations in the system By way of mathematical bacground, electrical and electronic engineers prefer to use j = as the imaginary number The reason is that the symbol i is normally reserved for electrical current Thus, a number of the form A = a + bj is a complex number (when a and b are real) The number A = a bj is called its conjugate It is also possible, and indeed sometimes more convenient, to represent the complex number A in polar form, written as A = re jθ, EEE/ENGG0/0 () Page of 9
4 ENGG0 Homewor Question where r = a + b is the magnitude, and θ = tan ( b a ) is the angle In this representation, we have made use of Euler s formula e jθ = cos θ + j sin θ A consequence of this formula is that we can express the cosine of an angle as cos θ = ejθ + e jθ For this question, consider a system of the form z + z, where in class we have derived that the poles are at ± 4 Part(a) When = 0, the two poles are at {0, } Setch in the diagram below the trajectories of the two poles as increases from 0 We have drawn one for you At what value of that the two poles meet? Imaginary The two poles meet when 4 = 0, or = 4 Real Part(b) When > 4, the term ( 4) inside the square root is negative We write, instead, that the poles are at ± 4 j Note that the two poles are now complex, and are conjugates of each other Draw the trajectories of the poles as increases from 4 What is the magnitude of the poles? As increases from 4, the real part of the poles stays at, while the imaginary part increases in magnitude Imaginary Real The magnitude of the poles is ( ) + ( ) (4 ) = EEE/ENGG0/0 () Page 4 of 9
5 ENGG0 Homewor Question Part(c) Now let us consider, specifically, that = Express the poles of the system in polar form Let r be the one with the positive imaginary value, and r its conjugate When =, the roots are at ± j The magnitude is ( ) + ( ) =, while the angle is ± tan / / = ± π 4 Therefore, Part(d) r = + j = e j π 4 r = j = e j π 4 Show that we can compute the partial fraction of the transfer function and arrive at We can combine the partial fractions so that r r z + r rz r r z + r rz = (r r z ) + (r r z ) ( rz )( r z ) We now ( rz )( r z ) = z + z because r and r are the roots of the quadratic equation In the numerator, ( r + r = + ) ( j + ) j =, and that Therefore, r + r = ej π + e j π = 0 r r z + r rz = z + z Part(e) Show that we can express the output y[n] to an impulse input x[n] = δ[n] as ( ) n cos(n ) π 4 The cosine function explains the oscillation, while ( ) n leads to a decay in the magnitude EEE/ENGG0/0 () Page of 9
6 ENGG0 Homewor Question With the partial fraction, we now that Part(f) y[n] = r(r ) n + r (r) n = ( ) n e j π 4 e j π 4 + ( e j π 4 e j π 4 ( ) n+ ( ) = e j(n ) π 4 + e j(n ) π 4 ( ) n+ ( = cos(n ) π ) 4 ( ) n = cos(n ) π 4 Now let = Show that the two roots are now the partial fraction becomes where r = e j π r = e j π, s r z + s rz s = e j π 6 s = e j π 6, and the output y[n] to an impulse input x[n] = δ[n] is y[n] = cos(n ) π 6 ) n Note that while there is oscillation due to the cosine function, but there is no decay Similar to the derivation above, r = + j = ej π r = j = e j π For the partial fraction, the numerator becomes s rs + s r s EEE/ENGG0/0 () Page 6 of 9
7 ENGG0 Homewor Question We note that e j π 6 + e j π 6 = cos π 6 = =, while rs + r s = e j( π + π 6 ) + e j( π + π 6 ) = e j π + e j π = 0 So the partial fraction given in the question is valid Finally, for an impulse input, Question y[n] = s(r ) n + s (r) n = e j π 6 e j π n + e j π 6 e j π n = e j(n ) π 6 + e j(n ) π 6 = cos(n ) π 6 Bloc Diagrams for Control A generic bloc diagram for feedbac control systems is shown below: reference + error + controller measurement input sensor system output In this problem, we will substitute different content for the various blocs and compute the transfer function The possible blocs include: (A) (B) delay () (C) + delay () (D) When these blocs are substituted for either controller or system, the flow is from left to right; when they are substituted for sensor, the blocs are flipped horizontally and the flow is from right to left Part(a) Let the controller be D, the system be A, and the sensor be B What is the overall transfer function and the value of the pole(s)? For this and subsequent parts, let controller = C(z), system = P (z), and sensor = G(z) The overall transfer function is System A is, B is z, C is C(z)P (z) + C(z)P (z)g(z), and D is z EEE/ENGG0/0 () Page 7 of 9
8 ENGG0 Homewor Question For this part, ()() + ()()(z ) = ( )z Hence, we have a firstorder system with one pole at Part(b) Let the controller be A, the system be C, and the sensor be D What is the overall transfer function and the value of the pole(s)? z = z + ( + ) z = Hence, we have a firstorder system with one pole at Part(c) z Let the controller be D, the system be C, and the sensor be B What is the overall transfer function and the value of the pole(s)? z + z z = ( )z Hence, we have a firstorder system with one pole at Part(d) Let the controller be B, the system be C, and the sensor be B What is the overall transfer function and the value of the pole(s)? z z z = + z z + z z Hence, we have a secondorder system with two poles at ± 4 EEE/ENGG0/0 () Page 8 of 9
9 ENGG0 Homewor Question 4 Question 4 Binary Number Representation Part(a) What is the binary representation of the decimal number 7? 00 Part(b) Which of the following is the binary representation of the decimal number 4? (Hint: Spaces are inserted for ease of reading Each group contains exactly 6 binary digits) A B 0 C D 0 Part(c) Represent the number minus eighteen ( 8) in the following formats: (i) 6bit unsigned number (ii) 6bit s complement (iii) 6bit s complement (iv) 6bit signmagnitude, with a as the most significant bit representing a negative number Write your answer in the following table Indicate with N/A if the number cannot be using the specified format number 6bit unsigned 6bit s complement 8 6bit s complement N/A Part(d) B 6bit signmag For each pair of numbers A and B below, compare their values when they are treated as numbers in the four representations used in Part(c) Write down the larger of the two in the table below, ie if A > B, write A, if B > A, write B 6bit unsigned 6bit s complement 6bit s complement 6bit signmagnitude A : 000 B : 000 B A A A A : B : 0000 B B B A EEE/ENGG0/0 () Page 9 of 9