ECSE-4760 Real-Time Applications in Control and Communication 2011 Spring Exam 2 Monday 5/16 11:30 am Walker-6113 Name ______________________________ Section: MR 1:30___ MR 6:30___ (Grades will be posted on SIS when they are available. This exam is open book, open notes, etc., calculators, but NO laptops, Internet connections… Answer questions in only 5 out of the 8 sets corresponding to each of the experiments in the lab. You do not need to choose the experiments you performed but you will probably wish to do so. If you answer more than 5 sets, the first 5 will be graded. Each set is worth 20 points (max) with the breakdown shown by the questions. If you are missing any grades on RPILMS, make sure you bring the reports to me (JEC-6028) before the end of the day today to get your records corrected. Check (√) if answered. POINTS __ I Digital Logic ______ __ II Voice Processing ______ __ III Binary Communications ______ __ IV Digital Filter ______ __ V Interactive Graphics ______ __ VI Hybrid Control ______ __ VII DC Motor ______ __ VIII Optimal Control ______ TOTAL ______ I Digital Logic Design 2011 Name _________________________ 1a. (12pt) Given the state machine with Next State Table and Output Table below, find the expression for J0 and K0 the LS bit in the JK flip-flop implementation and simplify them (using Carnough maps). Input 0 1 P.S. 000 001 100 001 010 100 010 011 100 011 011 100 100 000 011 101 000 110 110 000 110 111 d d Next State Table Input 0 1 P.S. 000 0 0 001 0 0 010 1 0 011 1 0 100 0 0 101 0 1 110 0 1 111 d d Output Table 1b. (3pt) One or more of the states in the state machine (other than 111) cannot be entered intentionally during normal operation. Which one(s) could be removed and how could the table above be simplified? I Digital Logic Design 2011 Name _________________________ 2. (2pt) You have a state diagram for a 4-bit state machine that does not use states 2, 4, 6, 11, 13, and 15. After careful analysis it can be shown that 3 of the remaining states are redundant and can be replaced by a single state. What can be concluded about the modified state machine? 3. (3pt) Use any valid means to show that the following two expressions are equivalent: CD ABC (A B)CD AC(D DB) D(ABC ABC) II Voice Processing 2011 Name _________________________ 1. A delta-modulator has the following response plot of q(kT) Vout for e(kT) Vin: -1 -0.5 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 -0.1 0 -0.2 -0.3 -0.4 -0.5 -0.6 -0.7 1a. (2pt) What type is this? i) 1-bit ii) 1-bit with deadband 0.5 iii) 2-bit 1 iv) 2-bit with deadband v) can’t be determined 1b. (2pt) What are the values of the parameters A, B, C, and D? 1c. (2pt) TRUE or FALSE: This q(kT) could be created from e(kT) using only a 1-bit quantizer in parallel with a 2nd 1-bit quantizer with a deadband and adding the two quantizer outputs together. 1d. (7pt) Sketch on the same axis the reconstructed signal for the input below. The voltage of the 1st sample is 0. (Assume the signal does not saturate the system and the sample frequency is 100kHz.) Volts vs. time (µs) 4 3 2 1 0 0 -1 -2 -3 -4 50 100 150 200 250 300 350 400 450 II Voice Processing 2011 Name _________________________ 2a (4pt) For the DSP program used in the lab, sketch the expect output signal on the same axes for the given input signals below with the program set for S – 3 – 48/1. Note that the first plot spans 20ms and the second spans 2ms for the 2Vp-p input square waves. (You may neglect the effects of the output LPF & process delay.) 2b. (3pt) TRUE or FALSE: A minimum of 3 bits/sample on a voice signal is required for comprehension after speaker identification has been lost. III Binary Communications 2011 Name _________________________ 1a. (2pt) TRUE or FALSE: It is not possible to set up a code with a hamming distance of 7 that will automatically correct double bit errors and simultaneously detect 3, 4, and 5 bit errors. 1b. (2pt) TRUE or FALSE: It is not possible to set up a code with a hamming distance of 7 that will automatically correct double bit errors or detect 2, 3, 4, and 5 bit errors. 2. (2pt) What is the corrected code word for a received word of 1011101 in the lab’s Hamming code implementation and what are the message bits? 3. (6pt) What must the difference between pulse voltage levels (∆) be in a PAM system (in terms of the standard deviation of the Gaussian noise) in order to guarantee that the probability of error is less than 0.00007? 4. (3pt) A true digital communication system uses both the in-phase and quadrature channels to transmit data efficiently. What 2 components of the voltage signal are detected and how does this improve the use of the signal space? 5a. (3pt) For a 4-bit code (message + check bits), what is the maximum number of messages bits possible and number of unique code words when the minimum hamming distance is 3? 5b. (2pt) For an 8-bit code (message + check bits), what is the maximum number of message bit possible and number of unique code words when the minimum Hamming distance is 2? IV Digital Filter Design 2011 Name _________________________ 1. (4pt) Why are the analog filter cutoff frequency and digital cutoff frequency for an LPF created by a scaled bilinear transformation very close to each other when the sampling frequency is much greater than (65x) the cutoff frequency? Show quantitatively that this is true. 2. (3pt) An Elliptic LPF has the following pole-zero diagram for a sample frequency of 12kHz. Sketch the pole zero diagram for the filter with the same specifications (same order and same cutoff frequency) with a sample frequency of 36kHz. Assuming symmetry, show all the poles and zeros on the positive complex plane. IV Digital Filter Design 2011 Name _________________________ 3a. (4pt) For an 8th order FIR (finite impulse response) filter: • • • y(k) x(k) find H(z) Y (z) in term of real gains a0, a1, … a8. X (z) 3b. (2pt) Are there any restrictions on where the poles and zeros may be located for real ai? 3c. (2pt) Can this form be used to create a Butterworth, Chebychev I, II, or Elliptic filter? Why or why not? 4. (5pt) For H(z) (z 2 1) find the phase of the response at fs/4 and 3fs/4. (z 2 1) V Graphics Simulation 2011 1. (7pt) Given a Gaussian pdf f1 (x, y) 1 exp 2 (2.25) ( 1 x 2 2 2.25 Name _________________________ y2 2.25 ) , C1 = 10, and a second Gaussian pdf 1 exp12 [(x 1) 2 y 2 ], C2 = 1, with equal a priori probabilities, determine the decision boundary 2 between the two probability functions, looking down on the x-y plane. f1 (x, y) 2a. (3pt) TRUE or FALSE: For two pdfs, if x1 = x2 = y1 = y2, but with distinct means, the decision boundary will always be a straight line, independent of the cost or a priori probability values. 2b. (3pt) If for some values of cost and a priori probability the decision boundary in 2a is a straight line, how will the slope be related to the means of the 2 probabilities? (Slope m in y = mx + b) 3. (7pt) For plant Gp (s) 5000 and compensator Gc (s) 4.75753(s8) , comment on its theoretical and practical (s300) s2 aspects with regard to its closed loop pole locations. You may assume one of the roots of the cubic polynomial is s = -9. VI Hybrid Control 2011 Name _________________________ ANSWER ANY COMBINATION OF QUESTIONS THAT ADD UP TO 20 POINTS. 1 so (s 5)(s 8) that the controlled system has poles on the ζ = 0.707 line and are a distance of at least 7 from the origin. 1. (10pt) Choose any method you desire to design a feedback controller for a plant with H(s) 2. (5pt) Given a system with a position error of 3, what is the steady-state error to a unit step input? 3. (5pt) For the plant defined by the rectangle with state feedback, what is the equivalent A matrix for the controlled system? y(t) r(t) VI Hybrid Control 2011 Name _________________________ 3a. (8pt) SET UP the equations to find the discrete matrices Ad, Bd, Cd, and Dd for a discrete pole-placement controller 0 1 0 1 1 0 given: A c , B c , Cc , Dc . If you use an expression eAt where A is a matrix, include 3 5 4 0 2 0 the steps needed to evaluate that expression by hand. 3b. (2pt) How many outputs does the system in 3a have? 4a. (3pt) For any of the PID approximations, if the 3 Volt step response for a set of gains saturates the output of the controller at ±10 Volts, what can be done to evaluate a step response without changing the PID gains? 4b. (2pt) TRUE or FALSE: Increasing the integral gain will slow down the rise time but not change the settling time. VII DC Motor Control 2011 Name _________________________ 1. (3pt) Correctly label the following 3 statements for the controlled system with plant Gp (s) compensator Gc (s) 7 s 2 . s 10 TRUE or FALSE: The error position constant is undefined. TRUE or FALSE: The error velocity constant is finite. TRUE or FALSE: The error acceleration constant is infinite. 123s 11 and s2 3s 8 2a. (5pt) For a purely proportional controller on the lab’s DC motor, what value of Kp will result in a critically damped response? 2b. (3pt) With a gain of Kp = 0.5 for a purely proportional controller and an ideal system (no worn gears and effectively zero friction), how big is the deadband in degrees? 3. (4pt) Given a 3rd order Gc(s), what will the order be for the Gc(z) obtained using the Tustin approximation? VII DC Motor Control 2011 Name _________________________ 2(s 2) . With a sampling frequency of 1kHz, s 8s 20 where are the poles and zero of the discrete compensator obtained with the Tustin approximation? 4. (5pt) A continuous compensator is found that has Gc (s) 2 VIII Optimal Control 2011 Name _________________________ 1. (4pt) For the 2nd order laboratory system in the experiment with 3V initial condition on x1(t), which of the following inputs held for the specified time will force the (noiseless) analog computer states to go to zero? Select all the appropriate solutions. i. +10V for 0.3s ii. +20V for 0.15s iii. -10V for 0.3s iv. +5V for 0.6s v. -5V for 0.6s 2. (2pt) How many solutions exist to the Riccati equation for a 1st order system? 3. (5pt) A system has been optimized with Q = 1.5 and R = 0.5 without a terminal state penalty. The controlled input and output are measured as: k 0 u(k) 7 x(k) 3 1 3.7 1.8 2 2.3 1.1 3 1.3 0.7 4 0.8 0.4 5 0.4 0.2 6 0.2 0.1 7… 0… 0… Find the value of the performance index for this Riccati solution. 4. (2pt) TRUE or FALSE: small changes in the weights of the Q matrix will produce large changes in the response plots for the system states. 5. (7pt) For the following values, find the feedback gains for the system: 0 0 1 0 5 0 1 Ac 0 1 0 , Bc 0, Cc 0.3 1.5 7 , Dc 2, Q 0 6 3 2 5 2 0 0 12 0 3 P 0 9 2, 3 2 2 12 0 3 0 1 2 3 2 4 0 0, R 8 7