ECSE-4760 Real-Time Applications in Control & Communications Spring 2008 Exam #2 Thursday 5/8 11:30 a.m. Low-3045 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. but no laptops; only calculators 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 break-down shown by the questions. If you are missing any grades on RPILMS, make sure you bring the reports to me (CII-6219) before the end of the day today to get your records corrected. 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 ______ ‘08 I Digital Logic Name _________________________ 2 Given the following state machine, with flip-flops from right to left labeled Q3, Q2, Q1, & Q0, the initial states respectively are 0, 0, 0, & 1. The gate is an XOR (exclusive OR) and behaves as an OR gate except it outputs a 0 when both inputs are 1. (Assume the CLR & PRE lines have been properly wired for operation.) 3 10 CLK Q 5 12 6 11 D PRE 3 Q CLR 8 D Q CLK Q 9 8 13 2 PRE 4 CLK Q 9 CLR 11 Q 1 6 D PRE 12 CLR 5 13 DSTM1 Q CLK Q 1 3 D CLR 2 PRE 4 10 1 CLK 1. (4pt) Find the sequence of the states Q3Q2Q1Q0 starting with 0001 until the pattern repeats. (HINT: there are more than 10 states.) Please check your answers carefully since other answers depend on it. 2. (2pt) How many unique states does this machine have? 3. (5pt) Treating this as a random state counter, create a next state table. Order the current states from low to high as a 4-bit binary number starting with 0001. I Digital Logic ‘08 Name _________________________ 4. (7pt) This state machine is to be redesigned using T flip-flops. Find the input equation for T0, the low bit in the new implementation and simplify it using a Karnaugh map. 5. (2pt) How many input equations are needed to be found to implement a JK flip-flop version of a similar D flip-flop state machine that has 63 unique states before repeating the pattern? ‘08 II Voice Processing Name _________________________ 1. (6pt) A sampling system has an incorrect value for the antialiasing and reconstruction filter’s cutoff frequency. The input is a single 12kHz sine wave. If the reconstruction is an ideal 15kHz LPF, what frequencies will be present in the reconstructed signal. Antialias Filter fco =15kHz Ideal Sampler fs = 20kHz Ideal LPF Reconstruction fco =15kHz 2a. (2pt) What is the value of the crest factor for a triangle wave? (HINT: the average of a 1V triangle wave squared is 1/3.) 2b. (4pt) Given a sine wave and Gaussian white noise with equal power, which has the highest crest factor? 3a. (4pt) For a delta modulator output shown below with a sawtooth wave input, given C = 0.4V and D = 1.4V, find the values of A and B. QuickTime™ and a decompressor are needed to see this picture. 3b. (2pt) Could these values of A, B, C, & D be implemented in on the lab voice/delta modulator DSP hardware? 4. (2pt) TRUE or FALSE: With 2 bits of resolution and sampling at 48kHz, spoken voice can be understood but the speaker cannot be identified. III Binary Communications ‘08 Name _________________________ 1. (7pt) For a Hamming distance of 5, what are all the possible operational modes, i.e. combinations for a code trading off between the number of errors corrected and the number of errors detected? 2. (3pt) In the laboratory Hamming system, if m1m2m3m4 = 0101 and the system is set for single error correction, find all the possible received codewords that would be able to correctly determine the message bits? 3. (2pt) TRUE or FALSE: A parity code with perfect retransmission will correct a 3-bit error transmitted word. 4. (5pt) Using RTZ (RZ) square pulses (50% duty cycle) in a PCM system sampling at 50kHz and 12 bits per sample, what is the approximate bandwidth of the channel where the spectrum of the pulses is down by about 20dB from its maximum value? 5. (3pt) What probability of bit error, Pe, is necessary to guarantee that an 8-bit word (assuming independent bit errors) is received error free 99.92% of the time? ‘08 IV Digital Filter Name _________________________ 1. (5pt) A 6th order filter was designed with fcutoff = 3kHz and fs = 18kHz. When it was downloaded to the Hyperception DSP board and executed, the measured fcutoff was found to be 8kHz. It was suspected that the sampling frequency was set incorrectly. What actual sampling frequency on the running filter would yield this cutoff frequency? 2. (6pt) Two digital filters, H1 (z ) z 0.5 z , and H 2 (z ) z z 1 are combined in parallel. What are the poles and zeros of the combined filters? 3. (3pt) For a 6th order Butterworth LPF or Chebyshev I LPF (don’t care about unity gain at DC) what is the numerator of H(z)? 4a. (2pt) What type of filter and what order is represented by the pole-zero diagram (LPF, HPF, etc.)? j z X X (2 zeros) -1 O -.5 (2 zeros) O 1 .5 X X -j B 4b. (4pt) If fs = 18kHz, at what frequency is the magnitude of the output maximized? ‘08 V Interactive Graphics Name _________________________ 5000 , is it possible to place the poles of the s2 compensated system at s = -2 ± j2 with a purely proportional H(s)? Why or why not? 1a. (4pt) Using the transfer function of just the DC motor G(s) 1b. (4pt) If the compensated feedback system in 1a. had poles at s = -2 ± j2, its stability would be classified as i) overdamped ii) underdamped iii) marginally stable iv) unstable 2a. (4pt) Given a Gaussian pdf f1 (x ,y ) f 2 (x, y) regions? 1 x 2 y 2 exp 2 , and a second Gaussian pdf 4 x 4 2 x 1 1(x 4) 2 y 2 1 exp , what range of values for x will divide the x-y plane into 3 distinct 6 9 2 1 2b. (2pt) What are the values of and 2 in f1 and f2? 3. (6pt) Given a Gaussian pdf f1 (x, y) 1x 2 y 2 1 exp , and a second Gaussian pdf 8 4 2 4 1(x 4) 2 y 2 1 f 2 (x, y) exp , determine the probability of the points (2,2) & (-4,0) belonging to f1. 6 9 2 1 ‘08 VI Hybrid Control Name _________________________ ANSWER ANY COMBINATION OF QUESTIONS THAT ADD UP TO 20 POINTS. 1. (10pt) Given the following open loop step response, design a Ziegler-Nichols PID controller and give its transfer function, Gc(s). The input is 3.5ustep(t) (note: input is not normalized and this must be considered). volts 4 input 3 output 2 1 1 2 3 4 5 t (sec) 2. (5pt) If a Gallier-Otto controller was designed for the plant in 1. above instead of the Ziegler-Nichols, the controlled system would be expected to have i) more overshoot ii) less overshoot iii) a much longer settling time iv) a much shorter settling time v) a steady-state error 3. (5pt) For the following system find a single value of K where the system becomes unstable. + K - (s+5)(s+15) 4. (5pt) Will a digital approximation to a Gallier-Otto PID controller, with no limits on the range of the control voltage applied as input to the plant, used in the experiment be expected to perform the same if the sample period is increased from 0.1s to 2.0s? Why or why not? ‘08 VI Hybrid Control Name _________________________ 5. (5pt) An FST controller on an ideal 2nd order system will reach and hold the desired value after 2 sample periods. The same controller on a 1st order system will do the same after a single sample period. Given a system whose output to a step input x(t) = Austep(t) is y(t) = A(1 – e-t), with T = 0.1 s find the values of the FST controller u(k), k = 0, 1 that will drive the output to 1 and hold it there. Note that u(k) = u(1) for all k > 1. 0 0 1 and Bc , find the location of the controlled system’s poles with 1 3 2 6. (5pt) Given a system with Ac pole placement gains kc1 = 1.5 and kc2 = 2. 7. (5pt) What expression or value is minimized by a Gallier-Otto controller? Give the name and equation. ‘08 VII DC Motor Control Name _________________________ 1. (4pt) Which of the following must be a phase lead compensator? (s z ) (s 2 p) (s z ) i). Gc (s ) 2 ii) Gc (s) 0.5 iii) Gc (s ) (s 2z ) 2a. (6pt) For the plant G p (s ) (s z ) (s p) 123s 11 s 2 3s 8 iv) Gc (s ) 5 (s 2) (s 10) v) none of these and compensator GC (s ) 7 s 2 , s 10 what is the value of the acceleration error constant Ka and the steady-state error, ess, to a parabola input? 2b. (2pt) If the Dead Zone for the system in degrees is defined as 10 , what must be added to the compensator Kv Gc(s) in 2a. to control the system with a finite steady-state error to a ramp input? 3. (5pt) Find the Tustin approximation to an analog integrator with sampling time T = 1s. Give the difference equation in terms of output y(k) and input x(k). 4. (3pt) TRUE or FALSE: A minimal prototype controller will result in a lower order controller than a ripple free controller. ‘08 VIII Optimal Control Name _________________________ 1. (2pt) TRUE or FALSE: Assuming the lab system would still behave properly with larger voltages applied, inputting a 20V square pulse for 150ms would have the same effect of driving the output to 0. 2. (4pt) An optimal LQR controller is applied to a hypothetical system. The state responses for the controlled 1 0 system are x1(t) and x2(t) for an input u(t) when R = 0.75, Q = , H = 0, and tf = ∞. Set up the equation to 0 2 be solved to calculate the performance index J and simplify by removing the matrices from the equation. 0 1 2 3a. (4pt) For a continuous optimal LQR system with A = , B = , C = 3 0.5 , D = 9, 7 3 1 5 10 1.5 .5 5 Q = , R = 2, P = , and x0 = , give the uncontrolled system state and output matrix equations. 0 2 .5 1.2 0 3b. (2pt) Why doesn’t the optimally controlled system change if C and D are given new values? 4. (4pt) Which of the following matrix (matrices) is (are) Positive Definite? 4 3 i) P = 3 3 2 3 ii) P = 3 1 8 3 iii) P = 3 1 4 6 iv) P = 6 10 4 6 v) P = 6 10 5. (4pt) For an initial set of Q and R coefficients, the system response is shown below left. For a modified set of Q and R the response is shown below right. What was most likely done to Q and R to change the response? i) R was increased ii) R was decreased iii) q22 was decreased iv) q22 was increased v) i & iii vi) ii & iv vii) i & iv viii) ii & iii volts volts 2 x1 2 x1 x2 x2 5 t (sec) 5 t (sec)